问题
My website loads values into my data layer after the website loads. I'd like to fire tags when certain values appear in my data layer, and incorporate my data layer items into the tag (for example, an order id).
How can I achieve this?
Thanks!
回答1:
I assume you are doing a "push" to the dataLayer. Push a variable with the key "event" along with your orderid:
dataLayer.push({
'orderid' : '12345',
'event' : 'myEvent'
});
Then create a trigger type custom event
where "event name equals myEvent
' and use this to trigger your tag:

来源:https://stackoverflow.com/questions/30360805/how-do-i-fire-a-tag-in-gtm-when-a-value-appears-in-my-data-layer