Google Tag Manager / Analytics wrong accounts - google-analytics

I created a new TagManager Account.
I added the Code to the head and body space on my website.
I created a Container.
I added a Google Analytics Tag
I created a Variable with exact the UA-XXXXX-1 id for my property.
(I have dozens of different Google Analytics properties in my account.)
Now when I publish the Google Tag Manager changes, the Tag is published and visible. But it publishes a SECOND WRONG property-ID. UA-XXXXX-2.
Yes, the UA-XXXXX-2 is also in MY ACCOUNT. But a complete different Website property!
I have no clue where the TagManager - which is setup completely new - gets the ID from another property. I didn't provide that ID anywhere (the property is archived).
The "Google Tag Assistant" is telling me that I have multiple Tags implemented, but that could not be true.
Error Message: (Multiple Google Analytics tags detected)
How can I solve that?
Affected site "www global-nights com"

This is not a GTM problem. The second account is bundled in a Javascript file (/cdn cgi/apps/head/6sJWcjIvV53_JPO8tyNGb15vJYg.js) included on the top of your page:
So I guess you should be looking into your Cloudflare settings rather than be looking at GTM.

Related

How do I Add 2 GA4 instances to a website

I have a domain that has several sites sitting underneath it.
ie
My.domain.com/firstsite
My.domain.com/secondsite
My.domain.com/thirdsite
I have created new GA4 properties under a central account for each site. The GA4 is applied to the relevant pages via tag manager and the inbuilt GA4 tag, the trigger was the specific url of the page and everything is currently tracking as expected without issue.
I would like however to add an overriding GA4 account to collect the events for all pages.
Is this as simple as me adding another GA4 property to all pages or is there anything I need to mindful about.
Many thanks in advance for your help.
You dont have to create seperate property for each site. You can add one property(or configuration) to each site.

Tracking Member, Non-Members using GTM

i need too track Members and non-members in the website using google tag manager. specifically, it is important to distinguish users prior and after sign up process and not overwrite them as members (even though they entered the website and non-members). i don't want to push the data directly to the google analytic so i need to create tags in google tag manager to be fired.
any suggestion?
cheers
You might want to take a look at Custom Dimensions to track the status of visitors on your site. For more information on Dimensions, you may find more details on Google's Support pages: https://support.google.com/analytics/answer/1033861
This would allow you to segment the data and Reports in Analytics based on those Dimensions.
Otherwise, if you cannot send data to Google Analytics from Tag Manager, you might want to track users by settings cookies according the specific Rules. This article provides a gist of how to set cookies from within Tag Manager: http://www.simoahava.com/analytics/universal-analytics-fire-script-just-per-session/

How to run Google Experiment within Google Tag Manager

I have been trying to get this to work for sometime and there seems to be very little information on how this works.
First, I would like to say that I tried the below method to get it working, so please read this before posting a solution.
What I tried:
I added the google analytics experiment code in a custom HTML block and had it fire only of the original page as stated by google. This doesn't work and seems to create a loop for users. A white page appears when users get to the experiment pages.
Does anyone know how to get this to work? Much appreciated
The Javascript versions of Google Content Experiments are not actually supported in GTM at the moment (they have do do either redirects or change the site on the fly and since it's hard to say in advance at which point during page load the tags fire, and it which order, this does not work very well - in the very best case the original page would load completely before the visitor is redirected to a variation).
The features page for GTM lists A/b testing tags as "coming soon" but does so since at least a year ago, so I wouldn't hold my breath.
However you can do variations serverside (you'd have to implement your own logic to display the proper variation to each users) and pass and experiment id and the variation number to GA via GTM. I do not think there is another (reliable) way to do this, at least not yet. If you need to do it with javascript you should add the experiment scripts to the page code instead of deploying them via tag managemement.
Having said that, there are descriptions for hacking around the GTM limitations using the Experiments Javascript API and some jQuery (here is one). When Google says that something is "not supported" it might just mean they didn't want to test all possible edge cases and err on the safe side. So you if you absolutely have to use GTM for Content Experiments you would have to test if something like this would work for you.
I hope that I understand your problem well. If yes, you can use Google Optimize instead of Google Experiment. The Google Optimize works with Google Tag Manager by default.
Here's what worked for me
For the pages in the Experiment, I implemented Google Analytics the "old fashioned way" with analytics.js instead of GTM.
I tested (with Realtime analytics) this and the Experiment page and the Google Tag Pages both report data.
I did post asking if there might be conflicts from ths.
It's possible to modify the Google Tag Manager (GTM) snippet to run synchronously by removing the j.async=true; line and placing it at the top of your page, immediately after the opening <head> element. Like so:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->
You can also retain support for users without Javascript by inserting the <iframe> part of the code in the original location specified by GTM (after your opening <body> element).
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe</noscript>
It's then possible to insert the Google Analytics Experiments code as a Custom HTML tag in GTM. Just make sure you check the 'support document.write()' checkbox.
Just don't forget to update GTM-XXXX with your container ID.

Google Tag Manager: adding Multiple Universal Analytics tracking IDs & auto-event tracking

I have not been able to find clear answers to the following:
for a client with several country sites (subdomains) I want to use a Google Analytics account per site, plus a roll-up account to collect data of all country sites into one account. I want to use Google Tag Manager to add the analytics to the sites.
To add 2 Universal Analytics tracking IDs in one container for a site, is it needed to change a name somewhere? As you have to do when adding analytics code manually to a site when using an extra roll-up account.
If so, what exactly?
subsequently I want to use autoevent tracking. To track for instance PDF downloads - which are in this case on outbound links. Which is explained in this Justine Cutroni post: http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/
But instead of using the standard macro for url path, I would rather see the url title or the linktext, as the url path is indecipherable in this case (a bunch of numbers and letters).
How can that be achieved? Given that the downloads are from dynamic catalogue pages (and thousands of them).
thanks
Why multiple accounts ? This would just work as well with profiles/views. That could potentially save you a bit of headache (if you have multiple trackers you need to push events etc. to all of them - for multiple view you just need a filter in your view settings).
Having said that, you find the settings for the tracker name under "advanced configuration" in the analytics tag template in the Google Tag Manager (both for ga.js and Universal Analytics). Tick the checkbox with the label "Tracker name" and enter the name (you need to rename at least one the trackers).

Event tracking for outbound links in Google Tag Manager

I am attempting to set up event tags for a specific link to a specific domain that occurs several times through out my site. I utilized Universal Analytics and the Link Click Listener and the gtm.linkClick where URL equals off domain site.com.
I am still seeing no activity on the link after having followed Google's set up docs verbatim. Is there a way to create an Event track for outbound links within Google Tag Manager?
You should have a tag that looks like this:
{{gtm.elementUrl}} is a auto-event variable with variable type Element URL
Your rule should look something like this:
Questions for you:
Are you sure you published it?
What happens when you inspect the click of the off-site link? Do you see a new object created in the dataLayer?
Any additional context you can provide around your configuration would be helpful.
Did you setup Google Analytics in GTM?
Hard to know what is wrong without more details. Try analyzing using fiddler.

Resources