Technical SEO

Five tests with SEO changes via Tag Manager

We tested on searchviu.com what Google takes from the rendered HTML and how long it takes.

GTM changeuntil visibleTitle + DescriptionnoindexCanonicalinternal linkURL in JSON-LD8 days
Eoghan HennFirst published: December 14, 2017Last updated: November 2, 202610 min read
Experiment from 2017

The method and result come from our test in December 2017. The section What has changed since then? describes where Google stands today.

In short
  • Today Google renders pages with a current version of Chromium. According to Google, title, meta description and links may be added via JavaScript. A canonical added via JavaScript should name the same URL as the source code.
  • In December 2017 we checked whether Google picks up five changes that Google Tag Manager only inserts during rendering. We tested title and meta description, noindex, canonical, an internal link and a URL that only appears in JSON-LD. For the internal link there was a control page without a link.
  • Google picked up all five. On the homepage it took 8 days, on the other pages around two months.

The question behind the tests

Our first experiment with hreflang had suggested that Google reads the rendered HTML for hreflang. After that we wanted to know whether this also applies to other SEO signals. Google Tag Manager is a good tool for this. It writes changes into the DOM via JavaScript. The source code from the server stays unchanged.

Our question was how Google handles pages that depend on JavaScript. The test was never meant as a recommendation to maintain SEO signals permanently via Tag Manager.

TestChange via Tag ManagerResultTime until visible
Title and meta descriptionHomepage, title changed only in capitalization, description in a few wordsGoogle shows the new version8 days
noindexMeta robots noindex on five unimportant URLsAll five dropped from the indexbetween 6 weeks and 3 months
CanonicalAuthor page points to the blog overviewAuthor page disappears from searchabout as long as noindex
Internal linkLink target rewritten on an unimportant pageTest page indexed, control page notaround two months
URL only in JSON-LDTest page only named in an inserted JSON-LD scriptTest page indexednot recorded separately

Title and meta description

On the English homepage of searchviu.com, a Custom HTML tag replaced the title and the meta description. In the title we only changed the capitalization, in the description a few words. The old version stayed in the source code. The script removes both elements and appends new ones to the head.

All scripts in this article are the originals from the 2017 test. They require jQuery, which was loaded on the website at the time.

// Custom HTML tag, trigger: English homepage <script> jQuery('meta[name="description"]').remove(); jQuery('title').remove(); var md_en = document.createElement('meta'); md_en.name = 'description'; md_en.content = 'We are building an SEO tool for site migrations that will surprise you! Subscribe to our newsletter to receive an invitation to our free beta testing phase.'; jQuery('head').append(md_en); var tt_en = document.createElement('title'); tt_en.text = 'Advanced SEO Tool for Website Relaunches - searchVIU 🦄'; jQuery('head').append(tt_en); </script>

Eight days after publishing in Tag Manager, Google showed the new version in the search result and kept it.

noindex

While setting up the tests, we noticed five URLs that should not be in the index. A tag with a trigger only on these pages removed any existing meta robots tag and added a new one with noindex, follow.

// Custom HTML tag, triggered only on the five pages that should be removed <script> jQuery('meta[name="robots"]').remove(); var meta = document.createElement('meta'); meta.name = 'robots'; meta.content = 'noindex, follow'; jQuery('head').append(meta); </script>

Then nothing happened for a long time. We did not measure exactly how long. It was between six weeks and three months. After that, all five pages had disappeared from the index. We checked this with a site: query covering all five URLs, to which Google replied “did not match any documents”.

site:searchviu.com/en/we-are-going-to-miss-you/ OR site:searchviu.com/de/wir-werden-dich-vermissen/ OR site:searchviu.com/en/author/ana-cidre/ OR site:searchviu.com/en/thank-getting-contact/ OR site:searchviu.com/en/embed/

Canonical

Google ignores a canonical when other signals contradict it. For a clean test we therefore needed a pair where the canonical clearly fits. Eoghan Henn's author page only showed posts that also appear on the blog overview. A tag on the English author page removed any existing canonical and set one pointing to the blog overview.

// Custom HTML tag, trigger: Eoghan Henn's English author page <script> jQuery('link[rel="canonical"]').remove(); var link = document.createElement('link'); link.rel = 'canonical'; link.href = 'https://www.searchviu.com/en/blog/'; jQuery('head').append(link); </script>

It took about as long as the noindex. After that, the author page no longer ranked for the search “eoghan henn searchviu”. Because this part relied on a single URL, we repeated it in 2018 with more pages. You can read about it in the guide Canonical via JavaScript.

What interested us most was whether Google follows links that only exist in the rendered HTML. For this we created two identical test pages. Neither was in a sitemap, and there were no pings or other hints when they were published. On an unimportant page we picked a link that hardly anyone clicks. It carried the id js-seo-test, and Tag Manager replaced it with a link to the first test page. The second test page stayed unlinked and served as the control.

// Custom HTML tag, trigger: only the page with the link <script> jQuery('a[id="js-seo-test"]').replaceWith('<a href="https://www.searchviu.com/en/js-seo-test-page-linked-internally/">Get in touch</a>'); </script>

After around two months the linked test page was in the index, the control page was not.

A third test page appeared only in a JSON-LD script that Tag Manager inserted on the first test page. Its URL sits there in the sameAs field and nowhere else.

// Custom HTML tag, trigger: first test page (linked internally) <script> var jsonData = { "@context": "http://schema.org", "@type": "WebPage", "name": "JS SEO test page (linked internally)", "url": "https://www.searchviu.com/en/js-seo-test-page-linked-internally/", "sameAs": "https://www.searchviu.com/en/js-seo-test-page-linked-via-sameas/" } var script = document.createElement('script'); script.type = 'application/ld+json'; script.text = JSON.stringify(jsonData); jQuery("head").append(script); </script>

The third test page was indexed as well. So Google also used structured data to discover URLs. We documented both results with two site: queries. The first excludes the sameAs page and returned exactly one result, the internally linked test page. The second returned both test pages. The test pages no longer exist, so the queries reflect the state at the time.

site:searchviu.com "js seo test page" -sameas site:searchviu.com "js seo test page"

Our conclusion

Google picked up all five changes from the rendered HTML and ignored the source code. What differed markedly was the time until they were picked up. The homepage needed eight days, the other pages around two months. At the time we concluded that Google renders important pages more often than unimportant ones. Earlier JavaScript tests with negative results may have run too briefly, especially when the test pages were new and unimportant. We had not set up regular measurement, so the timings are rough.

What has changed since then?

Since May 2019, Googlebot has rendered with a current version of Chromium. Google's documentation on JavaScript SEO now confirms several results of the test. Title and meta description may be set via JavaScript, and links may be added to the DOM via JavaScript. A canonical via JavaScript is possible. However, it should name the same URL as the canonical in the source code, or the source code should have none at all.

For noindex, Google now warns of a special case. If noindex is already in the source code, Google may skip rendering. A script that removes the noindex then never runs. Our test went the other way. The noindex was only added via JavaScript.

For links, Google now only names <a> elements with href. We have not retested whether a URL that only appears in JSON-LD still gets indexed today. On waiting times, Google writes that a page may sit in the render queue for a few seconds, but it can also take longer. Our eight days and two months from 2017 are an old one-off measurement. According to Vercel (December 2024), AI crawlers such as GPTBot and ClaudeBot do not execute JavaScript at all. Anything that only Tag Manager inserts is missing for them.

What does this mean for your website?

  1. Use Tag Manager for SEO changes as a stopgap or test. The permanent solution belongs in the source code.
  2. After every change, check what Google sees with the live test in Search Console's URL Inspection.
  3. For unimportant pages, allow weeks before you judge a result.
  4. Compare source code and rendered HTML regularly. Someone else can change a tag in Tag Manager at any time.

Common mistakes

  • A canonical is added via Tag Manager and the old one stays in the source code. The page then has two canonicals.
  • noindex is in the source code and is supposed to be removed via JavaScript.
  • Links are built as buttons or with onclick instead of as <a href>.
  • A test is abandoned as failed after a few days.

Frequently asked questions

Does Google pick up changes from Google Tag Manager?

In our test, yes, for title, meta description, noindex, canonical and internal links. Google evaluates the rendered HTML for this.

How long does it take for Google to show a GTM change?

On our homepage 8 days, on less important pages around two months. That was in 2017. Today Google says a few seconds for the render queue, but writes that it can take longer.

Can I set noindex via JavaScript?

Adding it worked in our test. Removing it is risky, because Google may skip rendering when there is a noindex in the source code.

Does Google follow links that JavaScript inserts?

Yes, if they are <a> elements with href. Our test page, which could only be reached via such a link, was indexed, the control page was not.

Should I control SEO permanently via Google Tag Manager?

Better not. The changes only take effect after rendering, AI crawlers without rendering do not see them, and tags are easy to change without anyone noticing.

The searchVIU SEO Crawler renders every page with Google Chrome and compares source code and rendered HTML for each URL, for example for title, canonical, noindex and internal links. The complete crawl runs every week. Page Watch checks your most important pages continuously, spread across the day, and also detects titles, canonicals and robots directives changed via JavaScript. Find out more on the SEO Crawler page.

Request a demo

Sources

Retrieved on October 15, 2026. If something is out of date or missing, let us know.

  1. Google, Understand the JavaScript SEO basics: https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics · As of Mar 4, 2026
  2. Google Search Central Blog, The new evergreen Googlebot: https://developers.google.com/search/blog/2019/05/the-new-evergreen-googlebot · May 2019
  3. Search Console Help, URL Inspection tool: https://support.google.com/webmasters/answer/9012289 · Retrieved Oct 15, 2026
  4. Vercel, The rise of the AI crawler: https://vercel.com/blog/the-rise-of-the-ai-crawler · Dec 17, 2024