Twice GTM code installed, does GA count hits twice? - google-analytics

If a website has two GTM code installed, how does GA count traffic? Does it mean the traffic we see in GA report is duplicate?
They are different containers but same GA property.
Thank you!

If both containers have the same GA account and both populate on the page (e.g. have the same rules), then yes, you'll have double the pageviews.

Well, first of all, why do you have 2 GTM codes?
When you set up a container and install the GTM on every page, you must also set up GA tracking as one of your tags on the Tag Manager container settings, when you set this up, you will have to choose which pages you wish to track, most likely, you need to select "All pages". With the live preview you can verify your tag is working and you can go to the GA real time traffic dashboard to make sure data is being recorded appropriately, of course, depending on your traffic, it might not be easy to tell if you are double-counting.
I guess I would say if you set up your Universal Analytics tag properly, you shouldn't have duplicate data...
Back to my question, maybe I can help you better if I know why exactly you have 2 GTM codes?
:)

Related

Migrating Meta Pixels from website to GTM

Question about migrating manually inserted Meta pixels/Events to GTM. Any feedback is much appreciated!
We manually installed the FB Pixel and manually created events b installing the code into our website a few months ago.
Now, we want to migrate all of these events, including the pixel loading code to GTM.
My question: If I delete the existing pixels loading/event creation code on the website and create the appropriate tags/trigger in GTM:
a) will those 'new GTM' events be pushed as new events to Meta
b) will the pixel have to re-learn?
c) will I lose the data flowing into my existing ads?
For example, if I delete the following code from the website and create the appropriate tag in GTM how will these events change?
<script>
fbq('track', 'Lead');
 </script>
a) No, there is no magic whatsoever. Inspect how the network requests to Meta look right now, then reimplement them in GTM and in GTM preview on your lower env make sure the GTM-spawned network requests are exactly like they are on prod. As long as the requests are the same, the endpoint won't know the difference.
b) No, it won't know anything has changed. Exceeept... Note that some adblockers may block GTM, but allow facebook, so the volume of conversions may be slightly lower, but that shouldn't affect FB's learning.
c) You may lose some data, but not much since most of the adblockers block both, facebook and GTM. The data loss is likely to be low enough to be immeasurable and insignificant.
But again, during the development, test your network requests if you don't want surprises. The data should not change unless you make mistakes.

Google Analytics - remove second URL

Annoyingly someone accidentally duplicated my google analytics tag on a second site and now all their site traffic has been mixed into the original sites on GA.
Could someone guide me through removing the second URL from the account?
I've looked at filters but can't get my head around it.
the property is a GA4 site.
Thanks!
You looked in the right direction. You want to filter by the hostname. Note that it won't remove the historical data, it will just prevent it to get to GA in future.
Also, you can apply filters to your local reports to remove the wrong hostname-related data from them.
Besides, GA4 is still raw. It's suggested to keep both, - GA4 and UA in place and use the latter for day to day analysis while the former collects data for when UA is not available anymore.
You can't do it.
The saved data in Google Analytics cannot be changed.

google analytics is mixing up my two websites when showing reports

google analytics is mixing up my two websites when showing reports. Eg. the top 5 pages include 3 pages from one website and 2 from the other website.?? Can anyone help me, please?
I dont know what to try and I can't find a help page for google analytics
The most common way for this to happen is if your tracking code is present on the both the sites in question (it is possible spam a GA account and achieve the same effect, but as you own both the sites I do not believe this to be the case.).
I suggest:
- check the audience > technology > network > hostname report. This will tell you all the sites that your code is present on and should confirm that your code is also present on an additional site.
- check the source code of the other site. Is the code present? look for either GA code or a GTM container. If you're using GTM then check to see whether it is the same container or a different container injecting the same GA code.

Difference in Sessions data in GTM vs GA

I found 10% high number of sessions in the GTM analyitcs data than the GA. Both has different tracking properties, have similar settings(as Simoahava mentioned #here), Hence the Ecommenrce rate is affecting due to huge difference of sesions data in both properties. Any insights ?
Screenshots :
Session via GTM Session via GA
Even when out of scope for the question i need to advice you to remove the legacy UA code from site and just duplicate the hits from GTM. (Simo has a post about it)
Now going into the question it self this can have a couple of reasons:
Does the filters on both views match?
Does both views has the same region (on the config)?
And i have another theory but this is not at all checked. (i would like to look into it)
GTM has a noscript snippet which allows to send non-script dependent tags even when javascript is not enabled. This is an advantage against the old GA code which doent have this feature.
Point i may have to look into:
Does the pageview count as a non-script dependent tag?
Is the traffic without javascript that relevant in volume? (10% is a lot)
Hope it helps !

Preventing an iframe on the same domain from triggering a page exit in Google Analytics

I am working on a third party website that contains a web application embedded in an iframe on the home page. This iframe is hosted on the same same sub/domain.
Currently page views are being tracked with _trackPageview. Due to a requirement by marketing both pages use the same Google account Id.
Since the iFrame was implemented the marketing department has noticed that the bounce rate has dropped to almost nothing. I suspect that this is because Google is interpreting the pageView event on the iframe as the visitor hitting another page on the website.
Just for additional information, the domain of the _gaq object is being set to "none" for both the container page and iframe.
Does Google provide a mechanism by which you can trigger PageView in such a way that it isn't interpreted as subsequent pageview in this scenario? (I know that trackEvent has a noninteraction property to deal with this?)
Am I better off just disabling the PageView for the default iframe page?
Does Google provide a mechanism - apparently yes, but probably not for your use case.
The field documentation for Universal Analytics describes the non-interaction field thusly:
Specifies that a hit be considered non-interactive.
So in UA this does no seem limited to events but to apply to all hits (which would include pageviews). I want to point out that I have no tested it and that it seems counterintutive, so it might simply be that the documentation is incomplete/wrong here.
However as you are using "classical" Analytics this does not apply to you. Since upgrading the code is a good idea in any case you might want to push for an update to Universal Analytics (this piqued my curiosity so I will test this over the next few days and update this answer with the results - maybe you want to wait until then, or simply test it yourself).
It's possible, but not 100% clear to me that disabling the PageView event on the iframe will prevent your users from registering a page exit (the pageview may get recorded regardless). You can try removing that event and see if it works.
But a better way may be to implement a custom filter on a new View excluding traffic to that specific class of iframes. Make sure you keep your old View (or create a new one with further filters) to make sure you're capturing those iframe views, if you think that's necessary.

Resources