Table of Contents
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.

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
- Edit theme.liquid file
- And, within the head locate the {{ header_for_content}}
- 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">' }}
- 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.