Google Tag Manager
-
I recently discovered the Google Tag Manager and I am in the process of updating many of my websites with this feature. I am using Tag Manager to mange Google Analytics, Google Remarketing, Alive Chat, Woopra, etc. I have one question about how Tag Manager actually works.
As best I can tell, the Tag Manager code snippet that I insert into my web pages is the same for all my websites and does not include a unique ID. If that is the case, then Tag Manager must search all the URLs in the TM database to find a match. What is to stop someone else from adding some rules for my URLs to their containers? I expect Google has a method to ensure proper matching, but I'm not clear on how that is enforced.
Best,
Christopher -
You're right, the codes are unique. They are so small (4 characters) I did not recognize them as unique IDs.
Thanks for the info on the hostname filter as well.
Best,
Christopher -
There is a unique ID embedded in your Tag Manager code, Christopher. It's specific and different for each container you create for each site (i.e. each container has a different ID). So the Tag Manager code on your pages is calling rules from your specific container. Nobody else's rules could affect your account unless you let them add their snippet to your site.
Here's an example of the Tag Manager snippet showing the unique ID In this case anonymized to GTM-XXXX:
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=<strong>GTM-XXXX</strong>"<br />height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
This is assuming, of course that you've followed the best practices of creating a new container for each website. If you're using cross-domain tracking or rollup reporting, I suppose to might be possible to implement all within one container even for multiple sites.
All that said - there's nothing to stop another website from maliciously adding your Analytics code to their own website (whether through Tag Manager or regular manual methods) to mess up your stats. The way to avoid this (and best practice for any site) is to ensure you have a hostname filter to remove all GA calls except those from your own approved hostnames. This also helps filter out "accidental" cases like where somebody has scraped your page contents including your GA code. You'd be surprised how often this happens.
Paul
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Can I safely asume that links between subsites on a subdirectories based multisite will be treated as internal links within a single site by Google?
I am building a multisite network based in subdirectories (of the mainsite.com/site1 kind) where the main site is like a company site, and subsites are focused on brands or projects of that company. There will be links back and forth from the main site and the subsites, as if subsites were just categories or pages within the main site (they are hosted in subfolders of the main domain, after all). Now, Google's John Mueller has said: <<as far="" as="" their="" url="" structure="" is concerned,="" subdirectories="" are="" no="" different="" from="" pages="" and="" subpages="" on="" your="" main="" site.="" google="" will="" do="" its="" best="" to="" identify="" where="" sites="" separate="" using="" but="" the="" is="" same="" for="" a="" single="" site,="" you="" should="" assume="" that="" seo="" purposes,="" network="" be="" treated="" one="">></as> This sounds fine to me, except for the part "Google will do its best to identify where sites are separate", because then, if Google establishes that my multisite structure is actually a collection of different sites, links between subsites and mainsite would be considered backlinks between my own sites, which could be therefore considered a link wheel, that is, a kind of linking structure Google doesn't like. How can I make sure that Google understand my multisite as a unique site? P.S. - The reason I chose this multisite structure, instead of hosting brands in categories of the main site, is that if I use the subdirectories based multisite feature I will be able to map a TLD domain to any of my brands (subsites) whenever I'd choose to give that brand a more distinct profile, as if it really was a different website.
Web Design | | PabloCulebras0 -
In Wordpress getting marked as duplicate content for tags
Moz is marking 11 high priority items for duplicate content. Just switched to wordpress and publishing articles for the site but only have a few. The problem is on the tag pages. Since there aren't very many articles so when you go to the tag pages it lists one or two articles and hence there are pages with duplicate content. Most of the articles have the same tags / categories. Perhaps I'm using too many tags and categories? I'm using about 7 tags and around 2 categories for each post / event. I've read the solution is using canonical tags but a little confused on which page I should use for the tag and then I believe I need to point the duplicate pages to the correct page. For example, I have two events that are for dances and both have the same tags. So when you visit, site.com/tags/dance or site.com/events both pages have the same articles listed. Which page do I select as having the original content? Does it matter? Does that make sense? Someone was also saying I could use the Yoast plugin to fix, but not really seeing anything in the Yoast tools. I also see 301 redirects mentioned as a solution but the tag pages will be changing as we add new articles and they have a purpose so not really seeing that as a solution.
Web Design | | limited70 -
Trying to rank on top 3 in Google.co.uk for a moderate competitive keyword by having a .dk domain
Do you think I should switch my domain to a .com and use ccTLDs method for my other international domains ? The problem is that my .dk domain(norwell.dk) has a better SEO ranking that my .com domain (norwelloutdoorfitness.com) and also differs slightly in name. The primary keyword I want to rank is ' outdoor fitness' which is in the name of 'norwelloutdoorfitness.com', thus over the long-term providing better benefits. Let me know what you think. Thanks, Andrei
Web Design | | kkk92330 -
Why is Google Webmaster suddenly started showing hundreds of HTML Improvements
Why is Google Webmaster suddenly started showing hundreds of HTML Improvements I mean to ask, my hundreds pages are been shown as duplicate - despite canonical marked correctly Below are sample url - which are been crawled in own way. I have rechecked canonical tag - which is correct as URL - 1, in all 3 url Do i need to worry about anything or shall i presume its a flaw from search engine to report this as an issue (This only pertain to Forum section) http://www.mycarhelpline.com/index.php?option=com_easydiscuss&view=post&id=1683&Itemid=78 http://www.mycarhelpline.com/?id=1683&Itemid=78&option=com_easydiscuss&view=post http://www.mycarhelpline.com/index.php?option=com_easydiscuss&view=post&id=1683 ps - i know these are dynamic url and not sef friendly url, but its been 3 yrs and , due to our ignorance and site builder took advantage of this. now - nothing can be done much to make them sef friendly as site has several thousand pages and touchwood - these dynamic url are not impacting much
Web Design | | Modi0 -
Does Google penalize duplicate website design?
Hello, We are very close to launching five new websites, all in the same business sector. Because we would like to keep our brand intact, we are looking to use the same design on all five websites. My question is, will Google penalize the sites if they have the same design? Thank you! Best regards,
Web Design | | Tiberiu
Tiberiu0 -
Changing Links that Show Up when I Google Brand (Site) Name
Hi SEOmoz Community, A quick question for you all. I've added an attachment for reference. When I google my brand name, say for example, Applied StemCell, I see six links as well below the description. Oddly though, these links seem to be chosen at random, or at least I'm not sure how Google decides on them. When I click on one of the links that is the company's name, Applied StemCell it brings me to a PDF document! Is there any way I can choose which ones to display there? Thanks! OF2oVVN.png
Web Design | | swzhai0 -
Text in Images vs. Alt tags
Hi on my homepage i h ave multiple images They have the appropriate alt text for each image, but the text which the image displays is not written into the page and styled using CSS rather than placing text within an image. Is this a issue worth correcting, or is it sufficient to have just alt text for each image. Any major pros from having putting the text in the image into the CMS using appropriate CSS styling to achieve the same effect.
Web Design | | monster990 -
How to make Address Text Clickable for Google Map Link for Mobile Device
How do I make the address text on the site a clickable link for mobile devices?
Web Design | | bozzie3110