tag-manager icon indicating copy to clipboard operation
tag-manager copied to clipboard

Sequencing Tags in Tag Manager

Open dl-lim opened this issue 3 years ago • 3 comments

In Google Tag Manager, there’s a Tag Sequencing feature to allow tags to fire sequentially, so that, for example, one initiates a tracking pixel, and another fires asynchronously for individual events but are dependent on the first pixel.

Is there a similar feature here on Matomo Tag Manager? I note “Fire delay” and “Priority” but if the first script hasn’t finished firing, the second one may fire to no effect, since it is dependent on the first. This is definitely an important feature - for instance, with Facebook Pixels, which is a fairly popular tracking pixel that can be managed by MTM.

If there isn't currently a reliable way to do this yet, may I suggest a Feature Request?

dl-lim avatar Jan 04 '21 21:01 dl-lim

Thanks for creating this feature request @alderson59 👍

I don't think there is a similar feature yet except for fire delay and priority.

tsteur avatar Jan 06 '21 01:01 tsteur

This is really a problem, as I would like to extend a bit:

Situation "Google Ads" Tag and Event:

Two Triggers:

  1. page view, when opted into "marketing"
  2. page view, when opted into "marketing" and conversion happened

Two Tags:

  1. Google Ads general tag triggered by trigger 1
  2. Google Ads event code for conversion triggered by trigger 2 and depending on tag 1

Whatever happened, the 2nd tag was called before the 1st tag. Not working.

  • I tried to prioritize the tags. No effect.
  • I tried to delay tag 2. No effect.

I can't prioritize triggers - so I made a test. I knew, I created trigger 2 first and added trigger 1 later. Both are page view triggers.

When I deleted trigger 2 and recreated it (now after trigger 1) it started working correctly!

Is it, that after each pulled trigger, the related tags will be called in their order - before the next trigger will be processed? And are they worked on in order they have been created? Than prioritizing or sequenzing of triggers is also necessary - as otherwise prioritizing tags will have no effect at all.

dsp76 avatar Aug 11 '22 16:08 dsp76

alternatively a triggered tag may force another tag to be called before (if it wasn't yet). this would solve the issue as well.

dsp76 avatar Aug 15 '22 21:08 dsp76