How to Add a Like Button to Your Article Using Google Forms

3 min read
How to Add a Like Button to Your Blogger Article Using Google Forms

Want to add a simple Like button to your Blogger posts to boost engagement? You don’t need third-party plugins or complicated tools. In this guide, I'll show you how to create a working Like button using Google Forms — completely free and Adsense-friendly.


✅ Step 1: Create a Google Form for Likes

  1. Go to Google Forms and start a new form.
  2. Give your form a clear title like "Article Likes".
  3. Add a short-answer question labeled "Article Title or URL" to track which post received the Like.

✅ Step 2: Set Up Email Notifications (Optional)

If you want to get notified each time someone clicks Like, use this simple Google Apps Script:

How to Add the Script:

  1. In your form, click the three dots (top-right) → Script Editor.
  2. Paste the code below, replacing your-email@example.com with your real email:
function likeSubmitForm(e) {
  const itemResponses = e.response.getItemResponses();
  const message = itemResponses.map(itemResponse => itemResponse.getResponse()).join('');
  const address = 'your-email@example.com';
  const title = 'Your article received a Like!';
  const content = message + '\n\nView all responses in Google Forms.';
  
  GmailApp.sendEmail(address, title, content);
}
  1. Save your project (e.g., Like Button Notifications).
  2. Create a trigger for likeSubmitForm and authorize the script when prompted.

✅ Step 3: Embed the Like Button in Blogger

Follow these steps to embed the Like button directly into your Blogger articles:

  1. Click Send in Google Forms and copy the form link.
  2. In Blogger, go to Theme → Edit HTML.
  3. Find <data:post.body/> and below it, add the following code (replace FORM_ID and ENTRY_ID accordingly):
<b:if cond='data:view.isPost'>

  <div class="like">
    <button class="like-button" form="send-like" type="submit">Like</button>

    <form action="https://docs.google.com/forms/u/0/d/e/FORM_ID/formResponse" class="like-form" id="send-like" method="POST" style="display:none;" target="hidden_iframe">
      <input expr:value='data:post.title + " | " + data:post.url' name="entry.ENTRY_ID" readonly="readonly" type="text" />
      <iframe class="like-iframe" name="hidden_iframe" style="display:none;"></iframe>
    </form>
  </div>

</b:if>

Optional: Add this JavaScript snippet for user feedback:

<script>
//<![CDATA[
window.addEventListener("DOMContentLoaded", () => {
  const button = document.querySelector(".like-button");
  const form = document.querySelector(".like-form");
  const iframe = document.querySelector(".like-iframe");
  let submitted = false;

  setTimeout(() => button.classList.add("show-like-button"), 2000);

  form.addEventListener("submit", () => {
    submitted = true;
  });

  iframe.addEventListener("load", () => {
    if (submitted) {
      button.disabled = true;
      button.textContent = "Liked!";
      alert("Thanks for your feedback!");
    }
  });
});
//]]>
</script>

✅ Step 4: Test the Like Button

  1. Publish your post and test the Like button functionality.
  2. Check your email (if notifications are enabled) to confirm you receive alerts for Likes.

💡 Why Use Google Forms for Likes?

  • ✅ Completely free solution using Google tools
  • ✅ No complicated plugins or third-party scripts
  • ✅ Adsense-friendly, clean design with no misleading buttons
  • ✅ Track Likes and improve reader interaction

❓ Frequently Asked Questions (FAQ)

Can I track Likes without email notifications?

Yes, simply check your Google Form responses or linked Google Sheet for all Likes, no emails needed.

Does this Like button work on other platforms?

Yes, any platform that allows HTML embeds can use this method, not just Blogger.

Can I customize the Like button's style?

Absolutely! Modify the CSS classes to match your blog's theme and design.

How do I prevent multiple Likes from the same person?

Enable "Limit to 1 response" in your Google Form settings, but this requires users to sign in with a Google account.

Is this method free?

Yes, Google Forms and associated features used here are completely free to use.