Reputation: 3906
I have an event name "foo" which is sent to the GTM with an object of data.
event: 'foo',
eventData: {
action: 'bar'
}
I would like this trigger to fire when the EventData contains an action called "bar"
How can I achieve that?
Upvotes: 1
Views: 1143
Reputation: 8907
Since eventData
is an object, you can either use a Custom JavaScript variable to trigger your tag where you do the check from there, or you could also define a Data Layer variable for eventData.action
and use that to trigger your tag. I'll leave it to you to play around and see what works. If you get stuck, post back here with what you've tried.
Upvotes: 3