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.
Related
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
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.
I'm setting up AdWords/Analytics event tracking on this page. I've previewed and debugged a click tracker for the Submit button (trigger=click ID) successfully.
However once I publish the tag, and test it live, no event data is passed through to GA. I've verified that I'm using the correct GA ID in the tag. This template has an injected GA script right before the GTM tag. Does the GTM tag need to precede the GA script in order to pass the data along?
I'm trying to create an Auto Event Tracking tag in GTM. However, I can't find Event Listener option under product types. You can see the screenshots of two tags with and without Event Listener.
What am I missing?
Thanks for helping out.
Are you wanting to fire a tag based on an event that occurs? From the looks of your tag name, Link Click Listener, you'll want to create a trigger that matches your criteria and then apply the trigger to the tag(s) you are creating. You needed to create event listeners in older versions of GTM, but the newer versions will automatically listen to link clicks. More info on auto-event triggers can be found here.
click listener trigger screenshot
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.