{"id":1846,"date":"2017-12-14T06:45:50","date_gmt":"2017-12-14T06:45:50","guid":{"rendered":"https:\/\/www.searchviu.com\/?p=1846"},"modified":"2026-01-27T13:35:48","modified_gmt":"2026-01-27T13:35:48","slug":"javascript-seo-experiments-google-tag-manager","status":"publish","type":"post","link":"https:\/\/www.searchviu.com\/en\/javascript-seo-experiments-google-tag-manager\/","title":{"rendered":"More JavaScript SEO experiments with Google Tag Manager"},"content":{"rendered":"<p><strong>After our little <a href=\"https:\/\/www.searchviu.com\/en\/javascript-seo-experiment-hreflang\/\">JavaScript SEO experiment<\/a> with <a href=\"https:\/\/www.searchviu.com\/en\/hreflang-google-tag-manager\/\">setting up hreflang with Google Tag Manager<\/a>, we decided to run some more tests, in order to analyse how Google deals with changes made to websites with JavaScript, using Google Tag Manager:<\/strong><\/p>\n<ul>\n<li>Does Google recognise changes to <strong>title tags<\/strong> and <strong>meta descriptions<\/strong> implemented with Google Tag Manager?<\/li>\n<li>Does Google de-index pages set to <strong>&#8220;noindex&#8221;<\/strong> with Google Tag Manager?<\/li>\n<li>Does Google respect <strong>canonical tags<\/strong> added with Google Tag Manager?<\/li>\n<li>Does Google index pages that are only linked via <strong>internal links<\/strong> injected with Google Tag Manager?<\/li>\n<li>Does Google index URLs that are only <strong>linked via JSON-LD markup<\/strong> implemented with Google Tag Manager?<\/li>\n<\/ul>\n<p>If you&#8217;re curious about the answers to these questions, and if you want to know exactly how to set all of this up with Google Tag Manager, keep on reading.<\/p>\n<p><strong>TL;DR &#8211; All of these tests worked out fine, but some of the changes took a very long time to show in Google&#8217;s results. Jump straight to the <a href=\"#conclusions\">conclusions<\/a> if you&#8217;re in a hurry.<\/strong><\/p>\n<p>Direct access to the different parts of the test:<\/p>\n<ul>\n<li><a href=\"#tt-md\">Replacing title tags and meta descriptions with Google Tag Manager<\/a><\/li>\n<li><a href=\"#noindex\">De-indexing pages with &#8220;noindex&#8221; tags implemented via Google Tag Manager<\/a><\/li>\n<li><a href=\"#canonical\">Adding canonical tags with Google Tag Manager<\/a><\/li>\n<li><a href=\"#internal-links\">Does Google follow internal links added with Google Tag Manager?<\/a><\/li>\n<li><a href=\"#json\">Does Google index URLs that are only included in JSON-LD scripts added with Google Tag Manager?<\/a><\/li>\n<\/ul>\n<h2 id=\"tt-md\">Replacing title tags and meta descriptions with Google Tag Manager<\/h2>\n<p>The title tag and meta description of the English home page of our company website, <a href=\"https:\/\/www.searchviu.com\/en\/\">https:\/\/www.searchviu.com\/en\/<\/a>, look like this in the HTML source document of the page:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/c7c97fab-tt-md-html-source-doc.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1851\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/c7c97fab-tt-md-html-source-doc.jpeg\" alt=\"title tag an meta description in the html source doc\" width=\"100%\" \/><\/a><\/p>\n<p>We used the following script in a Custom HTML tag in Google Tag Manager to replace the title tag and meta description, so that a different text shows in the rendered HTML:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/5da0855b-script-to-replace-tt-and-md.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1852\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/5da0855b-script-to-replace-tt-and-md.jpeg\" alt=\"script to replace title tag and meta description\" width=\"100%\" \/><\/a><\/p>\n<p>Note that for the title tag, we only changed the capitalisation, while in the meta description, we replaced a couple of words.<\/p>\n<p>Now, the original title tag and meta description still show in the HTML source document, but if you check the rendered HTML with Chrome&#8217;s developer tools, you will see that GTM replaces them with the new version we have defined:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/892416f2-tt-and-md-in-rendered-html.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1859\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/892416f2-tt-and-md-in-rendered-html.jpeg\" alt=\"title tag and meta description in rendered html\" width=\"100%\" \/><\/a><\/p>\n<p>Eight days after we published this change in GTM, Google started showing the title tag and meta description we added with GTM, instead of the original data from the HTML source document, and has been showing them ever since:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/af5a1163-google-result-for-searchviu.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1863\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/af5a1163-google-result-for-searchviu.jpeg\" alt=\"google result for searchviu\" width=\"100%\" \/><\/a><\/p>\n<p>We were not really surprised by this outcome, as we had previously run an experiment that had suggested that <a href=\"https:\/\/www.searchviu.com\/en\/javascript-seo-experiment-hreflang\/\">Google uses the rendered HTML<\/a> to interpret <a href=\"https:\/\/www.rebelytics.com\/hreflang-annotations\/\" target=\"_blank\" rel=\"noopener noreferrer\">hreflang<\/a> and ignores the HTML source document. So we kind of expected the same behaviour for title tags and meta descriptions.<\/p>\n<p><em>The fact that the changes only showed up after eight days didn&#8217;t surprise us either, as Google renders pages less regularly than it crawls them. It would require more research to make a more solid statement about differences between crawling and rendering frequency, so this is just a side note.<\/em><\/p>\n<p>Let us now have a look at some of the trickier things! Next stop: &#8220;noindex&#8221;.<\/p>\n<h2 id=\"noindex\">De-indexing pages with &#8220;noindex&#8221; tags implemented via Google Tag Manager<\/h2>\n<p>While we were setting up these tests, we stumbled upon a few URLs from our domain that we didn&#8217;t want indexed:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/fa92456c-searchviu-pages-to-be-noindexed.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1872\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/fa92456c-searchviu-pages-to-be-noindexed.jpeg\" alt=\"\" width=\"100%\" \/><\/a><\/p>\n<p>The following script, used in a Custom HTML tag in GTM, with a trigger that makes it execute on the pages we want de-indexed, adds a &#8220;noindex&#8221; meta tag to the pages in question:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/8768d2fe-add-noindex-with-gtm.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1876\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/8768d2fe-add-noindex-with-gtm.jpeg\" alt=\"add-noindex-with-google-tag-manager\" width=\"100%\" \/><\/a><\/p>\n<p>And then we waited. And waited. And waited. And lost hope. Google was just not picking it up.<\/p>\n<p>At this point, I have to admit that I am a sloppy researcher. I cannot tell you how long it took. Somewhere between 6 weeks and 3 months. But one day, Google decided to render the pages we wanted de-indexed and BOOM (all five pages successfully de-indexed):<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/ac81ff82-pages-deindexed.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1881\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/ac81ff82-pages-deindexed.jpeg\" alt=\"pages successfully de-indexed\" width=\"100%\" \/><\/a><\/p>\n<p><em>Here&#8217;s the search query I used in the above screenshot, in case you want to check it out yourself:<\/em><\/p>\n<p><a href=\"https:\/\/www.google.es\/search?hl=en&amp;q=site%3Astaging.searchviu.com%2Fen%2Fwe-are-going-to-miss-you%2F+OR+site%3Astaging.searchviu.com%2Fde%2Fwir-werden-dich-vermissen%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fauthor%2Fana-cidre%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fthank-getting-contact%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fembed%2F&amp;oq=site%3Astaging.searchviu.com%2Fen%2Fwe-are-going-to-miss-you%2F+OR+site%3Astaging.searchviu.com%2Fde%2Fwir-werden-dich-vermissen%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fauthor%2Fana-cidre%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fthank-getting-contact%2F+OR+site%3Astaging.searchviu.com%2Fen%2Fembed%2F&amp;gs_l=psy-ab.3...14203.15098.0.16044.5.5.0.0.0.0.0.0..0.0....0...1.1.64.psy-ab..5.0.0.f5V-Ta8Y-tA\" target=\"_blank\" rel=\"noopener noreferrer\">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\/<\/a><\/p>\n<p>So this also worked out just fine, but it took a lot longer than the changes to the title tag and meta description. Our theory right now is that less important pages get rendered even less frequently. But as I said above, we do need more research on the differences between crawling and rendering frequency before we can come to any solid conclusions about the topic.<\/p>\n<p>Let&#8217;s see if the same thing works with canonical tags.<\/p>\n<h2 id=\"canonical\">Adding canonical tags with Google Tag Manager<\/h2>\n<p>Canonical tags are tricky, because no matter how you implement them, Google often just decides to <a href=\"https:\/\/www.rebelytics.com\/hreflang-canonical\/#comment-31824\" target=\"_blank\" rel=\"noopener noreferrer\">ignore canonical tags if there are other signals that are in conflict with them<\/a>. So we needed to find an opportunity for a canonical tag that we were pretty sure Google would not ignore.<\/p>\n<p>One of the most important requirements for the correct use of canonical tags is that the entire content of the page that has the canonical tag be included on the page the canonical tag is pointing to. For this reason, we chose to set a canonical tag from <a href=\"https:\/\/www.searchviu.com\/en\/author\/eoghan\/\" target=\"_blank\" rel=\"noopener noreferrer\">my author page<\/a> to the <a href=\"https:\/\/www.searchviu.com\/en\/blog\/\" target=\"_blank\" rel=\"noopener noreferrer\">main blog page<\/a>, as the entire content of the former is available on the latter.<\/p>\n<p>Here&#8217;s how to set this up in GTM:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/d03e61b4-add-canonical-tag-with-gtm.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1888\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/d03e61b4-add-canonical-tag-with-gtm.jpeg\" alt=\"add a canonical tag with google tag manager\" width=\"100%\" \/><\/a><\/p>\n<p>To make a long story short: This worked out just fine, but it took just as long as the &#8220;noindex&#8221; change.<\/p>\n<p>Here&#8217;s the search result for the search query &#8220;eoghan henn searchviu&#8221; before we added the canonical tag with GTM:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/afc0c523-results-eoghan-henn-searchviu-23082017.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1890\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/afc0c523-results-eoghan-henn-searchviu-23082017.jpeg\" alt=\"\" width=\"100%\" \/><\/a><\/p>\n<p>And here&#8217;s the current result. The page has disappeared <em>(and, as a matter of fact, the ranking has been lost &#8211; just another interesting side note)<\/em>:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/408a5c1e-google-result-eoghan-henn-searchviu-121217.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1891\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/408a5c1e-google-result-eoghan-henn-searchviu-121217.jpeg\" alt=\"\" width=\"100%\" \/><\/a><\/p>\n<p>So Google does respect canonical tags added with Google Tag Manager (if they&#8217;re used in the right context).<\/p>\n<p>I know you&#8217;re mainly here for the info about links added with JavaScript, so let&#8217;s have a look at this now.<\/p>\n<h2 id=\"internal-links\">Does Google follow internal links added with Google Tag Manager?<\/h2>\n<p>One thing that we were really curious about when setting up this test was whether Google would crawl internal links that couldn&#8217;t be found in the HTML source document, but were added with JavaScript, using Google Tag Manager. So we set up the following little experiment.<\/p>\n<p>First of all, we created two identical pages on our WordPress website, one that we would link to internally with a link added via GTM, and another one that we would not link to internally:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/3ce8f156-test-pages-wordpress.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1893\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/3ce8f156-test-pages-wordpress.jpeg\" alt=\"the test pages in wordpress\" width=\"100%\" \/><\/a><\/p>\n<p>Why did we set up the second page? Well, if the first page gets indexed, we have to make sure it&#8217;s because of the internal link we injected, and not due to something else. We did make sure that the page wouldn&#8217;t appear in any sitemaps and that there weren&#8217;t any pings or other background mechanisms when we published it. But to be on the safe side, we decided to create the second page as a control page. The test result can only be positive if the first page is indexed and the second page isn&#8217;t.<\/p>\n<p><em>Maybe I&#8217;m not such a sloppy researcher after all&#8230;<\/em><\/p>\n<p>So let&#8217;s have a quick look at how we set this up in GTM. We picked a pretty <a href=\"https:\/\/www.searchviu.com\/en\/proudly-presenting-searchviu\/\">unimportant page<\/a> from our website, looked for a link that nobody would ever click on (hopefully) and used the following script in GTM to replace the target URL of the link with the URL of the first of our two test pages:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/d58fab78-replace-internal-link-in-gtm.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1894\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/d58fab78-replace-internal-link-in-gtm.jpeg\" alt=\"replace an internal link in google tag manager\" width=\"100%\" \/><\/a><\/p>\n<p>Here&#8217;s the result. The page that was only linked via a link injected with GTM was indexed, while the control page wasn&#8217;t. This, like the previous changes, took a very long time until it showed (roughly two months):<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/db5588fb-internal-links-result.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1895\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/db5588fb-internal-links-result.jpeg\" alt=\"result of the internal link test\" width=\"100%\" \/><\/a><\/p>\n<p>If you&#8217;re wondering about the <em>-sameas<\/em> part in the search query above, please read the next bit of this article. We created another test page that we only linked via JSON-LD injected with GTM to see how Google handles this kind of situation.<\/p>\n<h2 id=\"json\">Does Google index URLs that are only included in JSON-LD scripts added with Google Tag Manager?<\/h2>\n<p>If you know me, you probably know that I&#8217;m really into <a href=\"https:\/\/www.slideshare.net\/EoghanHenn\/implementing-schemaorg-in-the-jsonld-format-with-google-tag-manager\" target=\"_blank\" rel=\"noopener noreferrer\">implementing structured data (schema.org) in the JSON-LD format with Google Tag Manager<\/a>. Also, I had previously noticed that <strong>URLs from one domain that were included in JSON-LD scripts on another domain showed up as external links to the first domain in Google Search Console<\/strong>. Google does some <a href=\"https:\/\/www.rebelytics.com\/schema-org-google-image-search\/\" target=\"_blank\" rel=\"noopener noreferrer\">weird things<\/a> with the information it finds in structured data, so I wanted to know more.<\/p>\n<p>We decided to create another test page like the ones described in the internal link test above, but this time we would only include the URL in a JSON-LD script, and nowhere else. This is how to set it up in Google Tag Manager:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/669769b1-json-ld-test-gtm.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1896\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/669769b1-json-ld-test-gtm.jpeg\" alt=\"the json-ld test setup in google tag manager\" width=\"100%\" \/><\/a><\/p>\n<p>I guess that at this stage it doesn&#8217;t come as a surprise that this also worked. Google indexed the test page that was only linked via a JSON-LD script on the first test page:<\/p>\n<p><a href=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/69a9b75f-result-json-ld-test.jpeg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1897\" src=\"https:\/\/storage.googleapis.com\/seoviu_wordpress\/blog\/2017\/12\/69a9b75f-result-json-ld-test.jpeg\" alt=\"\" width=\"100%\" \/><\/a><\/p>\n<p>So JSON-LD scripts are another data source that Google uses for URL discovery purposes.<\/p>\n<h2 id=\"conclusions\">Conclusions: You can add everything with GTM, but it might take a while until the changes start showing.<\/h2>\n<p>The results of these tests have shown that <strong>Google will process and use title tags, meta descriptions, &#8220;noindex&#8221; tags and canonical tags added or modified with Google Tag Manager<\/strong>. The HTML source document is ignored and only the rendered HTML is considered.<\/p>\n<p>Furthermore, <strong>internal links can be added with Google Tag Manager and Google will index the URLs that are linked this way<\/strong>. Even URLs that are only included in JSON-LD scripts added with Google Tag Manager will be indexed.<\/p>\n<p>Unfortunately, this experiment wasn&#8217;t really designed to measure <strong>how long it takes for the changes to show in Google&#8217;s result<\/strong>. We didn&#8217;t set up a monitoring to check the results regularly. We do know that the changes to the title tag and meta description of the home page showed after eight days. All other changes took roughly two months until they showed.<\/p>\n<p>It seems obvious that Google renders pages less frequently and crawls their HTML source documents more regularly. <strong>Further research on the differences between crawl and rendering frequency would be very valuable<\/strong>.<\/p>\n<p>Former JavaScript SEO tests that didn&#8217;t take these huge delays into account might have had negative results because the tests didn&#8217;t run long enough, especially if they were conducted on pages that were only set up for the purpose of the experiment. It seems that important pages (like our home page in the case described above) are rendered more frequently than less important ones (like all of the other pages we did tests on that took roughly two months to show results).<\/p>\n<p>We hope that you found our little JavaScript SEO experiment useful and that many others will set up similar tests, so that the entire SEO industry can learn more about how Google deals with pages that rely on JavaScript. Any questions or remarks? Just drop us a comment![\/vc_column_text][\/vc_column][\/vc_row][vc_row type=&#8221;in_container&#8221; full_screen_row_position=&#8221;middle&#8221; column_margin=&#8221;default&#8221; column_direction=&#8221;default&#8221; column_direction_tablet=&#8221;default&#8221; column_direction_phone=&#8221;default&#8221; bg_color=&#8221;#0b9d95&#8243; scene_position=&#8221;center&#8221; text_color=&#8221;dark&#8221; text_align=&#8221;left&#8221; row_border_radius=&#8221;none&#8221; row_border_radius_applies=&#8221;bg&#8221; overlay_strength=&#8221;0.3&#8243; gradient_direction=&#8221;left_to_right&#8221; shape_divider_position=&#8221;bottom&#8221; bg_image_animation=&#8221;none&#8221; shape_type=&#8221;&#8221;][vc_column column_padding=&#8221;no-extra-padding&#8221; column_padding_tablet=&#8221;inherit&#8221; column_padding_phone=&#8221;inherit&#8221; column_padding_position=&#8221;all&#8221; top_margin=&#8221;20&#8243; constrain_group_1=&#8221;yes&#8221; bottom_margin=&#8221;20&#8243; centered_text=&#8221;true&#8221; background_color_opacity=&#8221;1&#8243; background_hover_color_opacity=&#8221;1&#8243; column_shadow=&#8221;none&#8221; column_border_radius=&#8221;none&#8221; column_link_target=&#8221;_self&#8221; gradient_direction=&#8221;left_to_right&#8221; overlay_strength=&#8221;0.3&#8243; width=&#8221;8\/12&#8243; tablet_width_inherit=&#8221;default&#8221; tablet_text_alignment=&#8221;default&#8221; phone_text_alignment=&#8221;default&#8221; column_border_width=&#8221;none&#8221; column_border_style=&#8221;solid&#8221; bg_image_animation=&#8221;none&#8221;][nectar_highlighted_text color_type=&#8221;regular&#8221; highlight_color=&#8221;#dd3333&#8243; text_color=&#8221;#ffffff&#8221; style=&#8221;full_text&#8221;]<\/p>\n<h3>Check a URL for <em>differences<\/em> between the original source code and the rendered HTML.<\/h3>\n<p>[\/nectar_highlighted_text][\/vc_column][vc_column column_padding=&#8221;no-extra-padding&#8221; column_padding_tablet=&#8221;inherit&#8221; column_padding_phone=&#8221;inherit&#8221; column_padding_position=&#8221;all&#8221; background_color_opacity=&#8221;1&#8243; background_hover_color_opacity=&#8221;1&#8243; column_shadow=&#8221;none&#8221; column_border_radius=&#8221;none&#8221; column_link_target=&#8221;_self&#8221; gradient_direction=&#8221;left_to_right&#8221; overlay_strength=&#8221;0.3&#8243; width=&#8221;1\/12&#8243; tablet_width_inherit=&#8221;default&#8221; tablet_text_alignment=&#8221;default&#8221; phone_text_alignment=&#8221;default&#8221; column_border_width=&#8221;none&#8221; column_border_style=&#8221;solid&#8221; bg_image_animation=&#8221;none&#8221;][\/vc_column][vc_column column_padding=&#8221;no-extra-padding&#8221; column_padding_tablet=&#8221;inherit&#8221; column_padding_phone=&#8221;inherit&#8221; column_padding_position=&#8221;all&#8221; centered_text=&#8221;true&#8221; background_color_opacity=&#8221;1&#8243; background_hover_color_opacity=&#8221;1&#8243; column_shadow=&#8221;none&#8221; column_border_radius=&#8221;none&#8221; column_link_target=&#8221;_self&#8221; gradient_direction=&#8221;left_to_right&#8221; overlay_strength=&#8221;0.3&#8243; width=&#8221;1\/4&#8243; tablet_width_inherit=&#8221;default&#8221; tablet_text_alignment=&#8221;default&#8221; phone_text_alignment=&#8221;default&#8221; column_border_width=&#8221;none&#8221; column_border_style=&#8221;solid&#8221; bg_image_animation=&#8221;none&#8221;][nectar_btn size=&#8221;medium&#8221; button_style=&#8221;see-through-2&#8243; color_override=&#8221;#ffffff&#8221; hover_color_override=&#8221;#ffffff&#8221; hover_text_color_override=&#8221;#ffffff&#8221; icon_family=&#8221;none&#8221; text=&#8221;Try our free tool&#8221; url=&#8221;\/en\/javascript-rendering-comparison-check\/&#8221; margin_top=&#8221;25&#8243;][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to change title tags, meta descriptions, noindex, canonical tags and internal links with Google Tag Manager and how Google deals with these changes.<\/p>\n","protected":false},"author":3,"featured_media":1112,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[29],"class_list":["post-1846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo-experiments","tag-engllish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Google Tag Manager SEO: Canonical &amp; meta tags via GTM \/ JavaScript<\/title>\n<meta name=\"description\" content=\"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.searchviu.com\/en\/javascript-seo-experiments-google-tag-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Tag Manager SEO: Canonical &amp; meta tags via GTM \/ JavaScript\" \/>\n<meta property=\"og:description\" content=\"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.searchviu.com\/en\/javascript-seo-experiments-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"SEO Data Warehouse And Monitoring\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-14T06:45:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-27T13:35:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"269\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eoghan Henn\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@searchviu\" \/>\n<meta name=\"twitter:site\" content=\"@searchviu\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eoghan Henn\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/\"},\"author\":{\"name\":\"Eoghan Henn\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#\\\/schema\\\/person\\\/7a031e5565b9ece3fd77be3c7f19381c\"},\"headline\":\"More JavaScript SEO experiments with Google Tag Manager\",\"datePublished\":\"2017-12-14T06:45:50+00:00\",\"dateModified\":\"2026-01-27T13:35:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/\"},\"wordCount\":2247,\"commentCount\":9,\"publisher\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg\",\"keywords\":[\"Engllish\"],\"articleSection\":[\"SEO experiments\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/\",\"url\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/\",\"name\":\"Google Tag Manager SEO: Canonical & meta tags via GTM \\\/ JavaScript\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg\",\"datePublished\":\"2017-12-14T06:45:50+00:00\",\"dateModified\":\"2026-01-27T13:35:48+00:00\",\"description\":\"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg\",\"width\":400,\"height\":269},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/javascript-seo-experiments-google-tag-manager\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.searchviu.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More JavaScript SEO experiments with Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#website\",\"url\":\"https:\\\/\\\/www.searchviu.com\\\/\",\"name\":\"SEO Data Warehouse And Monitoring\",\"description\":\"SEO Solutions For Teams And Agencies\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.searchviu.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#organization\",\"name\":\"searchVIU\",\"url\":\"https:\\\/\\\/www.searchviu.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/d3babe41-searchviu-logo2x.png\",\"contentUrl\":\"https:\\\/\\\/www.searchviu.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/d3babe41-searchviu-logo2x.png\",\"width\":340,\"height\":340,\"caption\":\"searchVIU\"},\"image\":{\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/searchviu\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/searchviu\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.searchviu.com\\\/#\\\/schema\\\/person\\\/7a031e5565b9ece3fd77be3c7f19381c\",\"name\":\"Eoghan Henn\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g\",\"caption\":\"Eoghan Henn\"},\"url\":\"https:\\\/\\\/www.searchviu.com\\\/en\\\/author\\\/eoghan\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Tag Manager SEO: Canonical & meta tags via GTM \/ JavaScript","description":"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.searchviu.com\/en\/javascript-seo-experiments-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"Google Tag Manager SEO: Canonical & meta tags via GTM \/ JavaScript","og_description":"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!","og_url":"https:\/\/www.searchviu.com\/en\/javascript-seo-experiments-google-tag-manager\/","og_site_name":"SEO Data Warehouse And Monitoring","article_published_time":"2017-12-14T06:45:50+00:00","article_modified_time":"2026-01-27T13:35:48+00:00","og_image":[{"width":400,"height":269,"url":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg","type":"image\/jpeg"}],"author":"Eoghan Henn","twitter_card":"summary_large_image","twitter_creator":"@searchviu","twitter_site":"@searchviu","twitter_misc":{"Written by":"Eoghan Henn","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/"},"author":{"name":"Eoghan Henn","@id":"https:\/\/www.searchviu.com\/#\/schema\/person\/7a031e5565b9ece3fd77be3c7f19381c"},"headline":"More JavaScript SEO experiments with Google Tag Manager","datePublished":"2017-12-14T06:45:50+00:00","dateModified":"2026-01-27T13:35:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/"},"wordCount":2247,"commentCount":9,"publisher":{"@id":"https:\/\/www.searchviu.com\/#organization"},"image":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg","keywords":["Engllish"],"articleSection":["SEO experiments"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/","url":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/","name":"Google Tag Manager SEO: Canonical & meta tags via GTM \/ JavaScript","isPartOf":{"@id":"https:\/\/www.searchviu.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#primaryimage"},"image":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg","datePublished":"2017-12-14T06:45:50+00:00","dateModified":"2026-01-27T13:35:48+00:00","description":"Can title tags, meta descriptions, noindex, canonical tags and internal links be added with Google Tag Manager? How does Google deal with the changes? Find out here!","breadcrumb":{"@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#primaryimage","url":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg","contentUrl":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/b458bcd2-js-seo-experiments-google-tag-manager-400x269-1.jpg","width":400,"height":269},{"@type":"BreadcrumbList","@id":"https:\/\/www.searchviu.com\/javascript-seo-experiments-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.searchviu.com\/en\/"},{"@type":"ListItem","position":2,"name":"More JavaScript SEO experiments with Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/www.searchviu.com\/#website","url":"https:\/\/www.searchviu.com\/","name":"SEO Data Warehouse And Monitoring","description":"SEO Solutions For Teams And Agencies","publisher":{"@id":"https:\/\/www.searchviu.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.searchviu.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.searchviu.com\/#organization","name":"searchVIU","url":"https:\/\/www.searchviu.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.searchviu.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/d3babe41-searchviu-logo2x.png","contentUrl":"https:\/\/www.searchviu.com\/wp-content\/uploads\/2023\/02\/d3babe41-searchviu-logo2x.png","width":340,"height":340,"caption":"searchVIU"},"image":{"@id":"https:\/\/www.searchviu.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/searchviu","https:\/\/www.linkedin.com\/company\/searchviu\/"]},{"@type":"Person","@id":"https:\/\/www.searchviu.com\/#\/schema\/person\/7a031e5565b9ece3fd77be3c7f19381c","name":"Eoghan Henn","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/88ecd619af8b41640851bdb169ff87f2ddec10119431686bd36effdde5ff2eb8?s=96&d=mm&r=g","caption":"Eoghan Henn"},"url":"https:\/\/www.searchviu.com\/en\/author\/eoghan\/"}]}},"modified_by":"Katja","_links":{"self":[{"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/posts\/1846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/comments?post=1846"}],"version-history":[{"count":3,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/posts\/1846\/revisions"}],"predecessor-version":[{"id":8715,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/posts\/1846\/revisions\/8715"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/media\/1112"}],"wp:attachment":[{"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/media?parent=1846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/categories?post=1846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchviu.com\/en\/wp-json\/wp\/v2\/tags?post=1846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}