Meta Pixel, Conversions API and attribution

How do I verify a domain for Meta with Google Tag Manager?

Google Tag Manager cannot verify a domain for Meta: the crawler reads static HTML and never runs JavaScript. Use a DNS TXT record or the HTML file instead.

Published

You cannot verify a domain for Meta with a tag fired from Google Tag Manager. Meta’s crawler reads the HTML of your homepage and does not run JavaScript, so a verification tag that Tag Manager injects after the page loads is invisible to it. Use the DNS TXT record or the HTML file instead, or move the meta tag into the template that renders the head on the server.

Why the Tag Manager route fails

Meta’s meta tag method has one precise requirement: the tag has to be in the <head> of the homepage of the root domain, in static HTML. Tag Manager works the other way. The container loads, then it writes tags into the page, which means the tag exists in a browser and nowhere in the source Meta downloads.

The failure is easy to misread. There is often no message at all, and the status simply stays unverified, because Meta’s crawler saw a page with no tag in it. When a message does appear it tends to say the verification code does not match, which sends people into a loop of copying the same string again. The tag is correct. The problem is where it lives. The other failure modes, error by error, are in why Facebook domain verification is not working.

A pixel fired through Tag Manager is a different question and works fine, because the pixel runs in the browser like any other tag. Verification is not a browser event. That distinction is the whole answer: Meta checks what the server sends, not what the visitor’s browser builds.

The three methods Meta accepts

MethodWhat you doWhere it has to beThe catch
DNS TXT recordadd the value Meta shows you at your DNS hostthe domain’s DNS recordspropagation, from minutes to 72 hours according to Meta
HTML filedownload Meta’s file and upload it uneditedthe root directory, at example.com/file.htmlonly two redirects are allowed, root to www and http to https
Meta tagpaste <meta name="facebook-domain-verification" content="..." /> into the headthe homepage of the root domain, in static HTMLthe crawler does not run JavaScript

Only the third one is the method people try to do in Tag Manager, and it is the one that requires code access rather than a tag container. With no access to the templates, the DNS record is the practical choice.

Verify with a DNS TXT record, step by step

  1. In Meta Business Suite, open Settings, then Brand safety and Domains.
  2. Click + Add, then Create a domain. If another portfolio already holds the domain, choose Request access to a domain instead.
  3. Enter the root domain only: example.com, not www.example.com, not https://example.com and no trailing slash.
  4. Choose the DNS TXT record method and copy the value exactly as Meta shows it.
  5. At your DNS host, create a TXT record with that value. If the host asks for a host name, use @ to place it on the root domain.
  6. Wait, then confirm the record with a public DNS TXT lookup before you touch anything else.
  7. Click Verify domain in Business Suite.

The DNS route is also the one that survives a site rebuild, a new theme or a move to another host, which is worth something on a domain you advertise from for years.

If the tag has to go in the site itself

When DNS access is the problem and you control the site code, put the tag in the template instead of the container:

  • On WordPress, add it to the theme’s header template, or to a plugin that prints code into the head. The setup that puts Meta code in the right place is described in how to set up the Meta Pixel on WordPress.
  • On Shopify, the theme’s theme.liquid file holds the head.
  • On a site you cannot edit at all, use DNS. A platform that only offers a code injection box may or may not print that box on the server, so test the source of the homepage with a plain fetch: if the tag appears in the HTML that arrives, without a browser, Meta can see it too.

One rule applies to all of them. Copy the tag as given. A tag that has been reformatted, wrapped in extra markup or moved out of the head produces the same mismatch error as a missing one.

What verification still controls in 2026

Older checklists say you verify a domain to rank 8 conversion events for iOS measurement. That reason has gone: Meta’s Aggregated Event Measurement article says you no longer prioritise 8 events per domain, that the tab has been removed from Events Manager, and that you are not required to verify domains for event configuration. A campaign created today does not ask you to pick a conversion domain.

What verification still does, in order of how much it matters to a lead generation account:

  • It gives you the list of Pages that advertise to your domain, and allow and deny lists for who may edit the link previews on those ads. That matters the moment an affiliate, a reseller or a former agency runs ads to your landing pages.
  • It is required to share a domain with a partner portfolio, with partial access or full control. It is the clean way for an agency to work on a client’s domain.
  • It can serve as proof for business verification when you have no business phone number or your email domain does not match the website.
  • It lets you edit the previews of organic posts that link to the domain, and gives crawl and share counts in Meta’s webmaster tool.

What it does not do is get an ad approved. Meta’s documentation does not list ad review among the reasons to verify, and a landing page still has to pass review on its own.

Where the verified domain sits next to tracking

Verification proves ownership of the domain. It says nothing about the events that domain sends, and the two are read in different places: verification in the business portfolio, events in Events Manager. The dataset those events land in is described in Meta dataset, and the wider picture, from the pixel to attribution windows, is in Meta Pixel, Conversions API and attribution. The full method comparison, including the cases where verification is worth the ten minutes, is in Facebook domain verification.

Questions on this topic

All questions on this topic →

FAQ

Can I add the verification tag through Google Tag Manager?+

You can add the tag, but Meta will not see it. Tag Manager writes the tag into the page after it loads, and Meta's crawler reads the HTML it receives without running JavaScript, so the check fails even when the tag is present in a browser.

Which method is fastest when I have no access to the site templates?+

The DNS TXT record. It needs access to the domain's DNS records rather than to the website code, and it works the same whether the site runs on WordPress, Shopify or a custom stack.

How long does a DNS record take to be picked up?+

Usually minutes and sometimes much longer. Meta says propagation can take up to 72 hours in some cases, and a record that has not propagated looks exactly like one that was never added. Confirm it with a DNS TXT lookup before you change anything.

Do I still need domain verification for ads in 2026?+

Not for conversion event configuration: Meta no longer asks you to prioritise 8 events per domain or to verify domains for that purpose. Verification still controls who may edit the link previews for your domain, and it is needed to share a domain with a partner.

Does verifying the domain help a rejected ad?+

No. Meta's documentation does not list ad approval among the reasons to verify. A rejected ad is about the creative, the targeting or the landing page itself, so verification changes nothing there.

Ready to find out what
converts, for real?

Free to start.

Start free →