Reputation: 75103
I'm trying to get my head around the after/before options in the Google Tag Manager system, and for an example, I want to set a custom goal in Clicky.
I created 3 tags
Clicky Analytics fires in every page where After Clicky only executes after the main tag (Clicky Analytics) fires, and Before Clicky the reverse.
and main tag:
the tags:
and the result is this:
Why not in the correct flow? as
In Google Tag Manager 1.0, we could specify a wait time (as the calls are async, maybe the issue is that's to fast), but now we have no such option...
The problem here is that I need to fire javascript code, before the main-tag loads, as per their documentation.
Upvotes: 0
Views: 829
Reputation: 8907
You're tags are firing exactly when you're telling them to, so there could be a mistake in your configuration. Here's an alternative which I just tested and these are my configurations and the results:
What you'll notice is that the Before and After tags have no trigger, and the Main tag is set to fire on all pages, and also has both Setup
and Cleanup
tags. If you do it this way, you will get your desired output:
Upvotes: 1