Tag not working only in live landing page subdomain - google-tag-manager

I have these 2 tags that works properly except for the landing pages hosted by our LP builder provider RDStation. One sends the conversion to Google Analytics and the other to Facebook. Both are triggered by one element visibility. What I'm tracking is a Form engagement with 3 steps. I'm expecting an event on GA and FB after the completion of the first step.
These tags work on the preview mode and both Pixel and Tag Manager are present in the live pages. The Form in other pages outside this host is the same code. I've tried to move code around, edit the form, edit and recreate tags and triggers. With no success. For some reason, very occasionally the tags work. I wasn't able to isolate the cause tho.
Stuck in this for 2 days, any ideas?
LP: https://materiais.bodyscience.pt/endermologia-02-2021-cons-online

If you have published the GTM with updated tags in my opinion the problem may be due to the way your page is made. If you look at the source of page you can see that the Tag Manager snippet is there 2 times, you have 2 times the head tag and 2 times the body tag ... Probably some conflict may be due to this, so first fix the page correctly and then try again.

Related

Google Tag Manager not firing where as it was previously

I've have a website where I configured Google Tag manager. ALl the tags were firing okay on page load and clicks events.
I then started to rename some of tags and triggers and file them in particular folders so they are neat. Now when I go to preview mode in tag manager, none of my tags fire where as they did previously. I've double checked my configuration tag and I have the correct measurement ID etc but just doesn't work.
What surprisingly does work are the events in summary bit in tag manager, so the standard events like scroll depth, window loaded etc seem to register.
I have no blocking triggers on any of my tags. I've also tried to restore my tags to a previous version but that's not helped at all.
Any ideas what else I could check? I think what could have broke the system was me renaming the configuration tag. I've now created another configuration tag and set it to fire on all pages but this does not fire when I navigate around the site. Is there anything else I could check?
First of all, you didn't complete your debugging and you failed to mention what kind of tags stopped working: GA4 or GA UA.
Using the GTM preview, fire a trigger, select it, see if your tag fired. If it didn't, find it in the list while having the trigger selected, select the tag, it will show the tag view and report on what triggers did not fire.
If this is not enough, then add debugging screenshots to your question.

Tag assistant shows duplicate GTM tags

I have a small website where I used Barba.js to create smooth transition between pages. So it won't load a new page completely fresh, but rather load the content in background using AJAX and add it to the existing document.
So to fire Google analytics page view event, I use History change trigger in GTM. And it seems to be working fine. in GA it is recording the page views correctly. But in Google Tag Assistant, it keeps increasing the count of GTM tag on every page load. And I have checked it is not adding GTM tag on page loads. It only adds a main content container to the document which doesn't contain GTM tag.
Here is the TAG Assistant screenshot after a 3rd page load :
The Google analytics page view event is fired 3 times which is correct, but the GTM is also recorded 3 times.
This is a common behavior of Google Tag Assistant with single page website. The plugin is unable to detect single-page transitions correctly, so it will report the GTM container loading for each new URL when in fact the container has only loaded once.
To understand if it is not actually loaded multiple times, try to open the Network requests of your browser's developer tools and look for requests for gtm.js, If you only see one per page loaded there are no problems.

Where to put your Google Analytics code

I know this question is asked before but because Google is conflicting itself in their support I was confused.
When generating a Google analytics code, Google Analytics tells me to put my tracking code immediately after the opening body tag:
However, I read on the Google support forum that it should be inside my <head> tag.
https://support.google.com/analytics/answer/1008080?hl=en-GB
Paste your snippet (unaltered, in it’s entirety) into every web page that you want to track. Paste it immediately before the closing </head> tag.
Anyone knows which one is best?
As long as it's enclosed properly between <script> tags, it should work anyway. The only tradeoff being that:
including it in the <head> section would result in a slower page rendering (because it would execute the js before parsing the rest of the page)
including it in the bottom of the page might not count people that land in your page, stay for 3 seconds and leave.
The latter won't happen in small pages, but I've seen it happen in forums and blogs where there is a lot of html rendering, a couple of feet of scrolling below the fold and the page completion takes several seconds. In those cases it is possible for people to leave before GA snippet is executed.
Current analytics code is asynchronous so even if you put it in the head it shouldn't affect the rendering time but in a few miliseconds.
TL/DR it's about the same when it comes to normal pages
As long as you place the code as it appears from Google, the tracking will fire.
The higher on the page you have your code, the better your stats will be.
For example, if you have a user with a slow internet connection (think smart phone with poor signal) and your page takes 3 seconds to load. If you have your tracking code higher on the page, the code will fire sooner and start tracking the user's time on site, including the bulk of the load time.
Say in the above example, that the GA code is the very last tag on the site, and after 2 seconds the user sees a link they're looking for, and clicks that link before the page has fully loaded. In this case, the GA code may never fire from the bottom of the page, and you've missed analytics on a hit/visit/visitor that actually went to your site.
Having the GA code in the header or near the top of your code DOES NOT have to slow down the load time. You can call the GA code asynchronously to keep it from slowing down the rest of the load (documented here: https://developers.google.com/analytics/devguides/collection/gajs/).

How can I tell if a website is firing virtual page views?

Is there a way to know how many page views are being fired, including virtual pageviews, when a browser lands on a page?
I'm investigating a severe bounce rate drop that is pretty clearly a technical issue since there has been no content or layout changes on the site.
We do have:
2 Google Analytics tags (Classic and Universal) throughout the site;
Optimizley is set up and testing.
Could this cause the problem?
Note, there is currently no event tracking on the site, just the base analytics tags.
Is there a way to see what tags (assuming that's it) are causing the issue? I am using httpfox (like fiddler) and added filter "utm" to see what's going on. Sure enough, 2 GA tags firing plus 2 dart pixels.
Would those cause page views though?
To check what is firing on the entire page. Download firbug for firefox and add the "omnibug" extension. The omnibug extension should be in the firefox firebug window when you open it.
When you go the omnibug in the firefix panel, you will see EVERYTHING THAT IS FIRING!
Is that what you are looking for?
To check what pageviews are firing correctly VERY QUICKLY in Google analytics. Do the following;
Make sure the google analytics code you have is on the page you want to track
Make sure your IP is not excluded or filtered out of the analytics profile
Login to your google analytics account
Go to Real-Time section on the left hand sidebar.
Click on Content
Go to your site and click on the link or go to the virtual pageview page you added the code to and then watch if that link shows up in the real-time -> content section.

Why would Google Tag Manager not fire a tag set to fire on "All pages"?

I'm having a real tricky problem with Google Tag Manager on my site.
On certain paths under my domain, GTM will load (Tag Assistant shows the right container loading, and the GTM console pops up when Debug mode is enabled) but not fire any tags, even tags set to fire on all pages. This is using the default regex for the All Pages rule, ".*" I know this since the Debug console shows all the tags in the container as "Not fired".
On the root of my domain, GTM works just fine and the container loads while tags fire as they should.
I even opened the Chrome console and got the current location with "window.location.href" - it returned the path, minus the hostname, of the page I was on as expected.
What possible situation would cause GTM to load properly on a page, but not fire All Pages tags?
If the GTM container is loading properly but the tags aren't firing, that's because the tags that you want to fire have prerequisites that need to be completed before firing. By prerequisites, I mean that some action has to happen before a user reaches the page you want the tag to fire on for it to fire.
For example, If you are trying to fire a Google Adwords conversion code on a thank-you page. That conversion code won't fire unless someone actually came to your site after clicking on an Adwords ad. If a person came organically, then that tag shouldn't fire, otherwise all your conversion reporting would be over counted.
Hope this helps!
I also have this problem which i found an answer to. After creating your tags and linking the
macros properly, preview in debug mode, it should FIRE. But take note that it wont count on Adword Conversion account.
I think you add a rule dat says gtm.formSubmit it worked for me.
Try it out.

Resources