1. Home
  2. /
  3. Web Design & Development
  4. /
  5. Shopify
  6. /
  7. How to remove multiple facebook domain verification meta tags from the head of a Shopify webpage?

How to remove multiple facebook domain verification meta tags from the head of a Shopify webpage?

Gravity Forms Prevent Spam form submissions using Stop Words or disallowed keywords

Introduction

Recently, I encountered an issue which took considerable amount of hours in fixing. In one of the Shopify stores I was managing, I found out that there were multiple facebook doman verification meta tags with different facebook ids and that was messing up my analytics.

Shopify - Facebook Domain Verification Meta Tags

I looked for the meta tags in all the liquid files including the backend settings section in Shopify but found no solution at all.

On debugging, I had found that the tag was getting inserted through the Shopify liquid code {{ content_for_header }} inside the <head> tag. I left the issue unfixed after spending a couple of hours as I was getting no solution. Again, after couple of hours, I jumped in to see and find a solution for this issue. And, luckily this time I managed to find it and fix it for good.

Steps to remove multiple facebook domain verification meta tags

  1. Edit theme.liquid file
  2. And, within the head locate the {{ header_for_content}}
  3. Now, replace the code with the below code.
 {% capture h_content %}
  {{ content_for_header }}
 {% endcapture %}

  
 {{ h_content | remove: '<meta name="facebook-domain-verification" content="z837acbrwsdfdsfsbui8779x67ta">' | remove: '<meta name="facebook-domain-verification" content="l7uxev7b5dsfsdfsdfsdfl3ys9n81g">' }} 
  1. Now, save the liquid file and refresh the page.
    The above piece of code will remove the duplicate facebook domain meta verification tags from your webpage.
Reviews & Ratings Get your stoe online with Shopify in 60 minutes Shop Now