GA4 events not firing on redirection - google-tag-manager

I've noticed that the GA4 events are fired in delay (about 1 sec after universal analytics fires)
This is ok as long as the event fires, but when the event is click on redirection link, the pages are redirected before the GA4 event fires (universal analytics is ok)
anyone knows anything about it?
I'm using GTM to store the event detail, and the click element has a unique id (data-attribute)

You can set tag firing prioritization, in your scenario keep GA4 tag at first priority.
Know more: https://support.google.com/tagmanager/answer/2772421?hl=en

Related

GA Event Tracking - Double form submission event logged

I have set up event tracking to track how many times the page is visited + how many times a modal trigger button is hit + How many times a form in the said modal is submitted.
Implemented tracking via GTM.
Now when I test with the GTM preview tool, events are reflecting fine but the form submission is displayed twice (with the event triggering for both) even tho form is submitted only once as intended.
Does this mean the GTM is logging 2 events for each submission or is having 2 occurrences in GTM preview a normal thing?
Screenshot of the preview tool
It is not normal, it means that the event is sent 2 times.

How do I set up my google analytics events manualy

I have a Analytics Tracking code. I have set up a whatsapp and email share and I would like to track when these are clicked.
I have inserted my Google Analytic Tracking Code in my header and it works. For my events I have set this up.
I have checked on Google analytics Real Time and I can see that the page view is firing but when I click on the whatsapp share it is not showing up in the events. Am I missing something that should be added which is preventing the event from firing?

GTM trigger on event

We have an iframe on site we cannot control. From this, we are able to send an event to our GA account when an action is completed that we want to track, which we turned into a goal in GA.
We can't control the iframe so can do no more than have this event fire (they set it up). We cannot install GA or GTM on the iFrame.
Is there any way to setup a trigger within GTM to fire when that event is recorded in GA?
Thanks
David
Instead of asking the iframe for an event, you can ask them to send you a window.postMessage(), which then you can listen to and dispatch a dataLayer event on, which then will trigger a tag in GTM and let you do all you want without having to hack into the third party iframe.

How to fire a pageview tag before any other analytics tag with Google Tagmanagement?

I see that on certain pages the event hits are being send to google analytics before the pageview hit is being send. This is causing some problems in my reports. I always thought that when the pageview trigger is fired before the event trigger, the same order would be applied for the sequence of the firing of the tags, but apparently it's not. What would be the best way to always fire the pageview tag before anyother tag is being fired?
Thanks in advance!
You can use GTM's "Tag firing priority": https://support.google.com/tagmanager/answer/2772421?hl=en
In your GA tag under Advanced settings:
Set "Tag firing priority" of your pageview Tag to "1".
Set "Tag firing priority" of your event Tag to "0" or lower.
Honestly, the event tags depend on the triggers you have defined. It might be the case you have fired the event on DOM Loaded, and page view on Window loaded. In short, it all depends on how you create the triggers and use them to fire tags.
If you know which event tags are firing before Pageview, you can use the GTM feature known as Tag Sequencing as its purpose is to facilitate the sequential firing of Tags.
You can define that the particular event tag must fire after the pageview tag. Your problem would be resolved. Its present under ag Firing Options in Advanced settings
Try Using tag sequencing, GA tracking should fire before your event tag. But make shure to limit the ga tracking to once per page, if not you will be firing twice the analytics code.
Reading your scenario, its possible tag sequencing might have unintended consequences. Since it's like adding a new trigger to the event tag - it would make a specific event tag always trigger after the pageview tag, regardless of the triggers it already has in place.
So you'd only want to use this if you always wanted the event tag to fire after the pageview. If the event tag is only triggered on some pages, you'd want to avoid this.
Similarly you would also need to remove your current triggers from your event to stop them firing before the pageview.
Instead, if the events are triggered for a certain URL, update them to trigger on gtm.dom (when the page's dom has loaded) or even gtm.load (when the whole page has finished loading) rather than gtm.js (when the gtm script first executes, which is the default used by your pageviews).
That means they should always trigger later in the GTM load process than pageviews, without forcing them to trigger on every single page.

Google Tag Manager Event Tracking - Pass a page as a parameter

I want to track the form submit event on Google Analytics using Google Tag Manager, and I would like to pass the page where the event was triggered as a parameter.
Considering that the form appears on several pages, how can I configure this?
Thanks in advance.
Just capture the event without passing the page, then view the pages that event was fired on by viewing the Behaviour > Events > Pages report in Google Analytics.

Resources