Automatic Trigger based on data layer value

Gold Contributor
Gold Contributor

Hi all,

 

I've got a scenario where I've got Ajax forms presenting a thank-you message on submission, and the developer has also been able to set a value in utag_data to reflect this (utag_data.leadform = "submit").

 

In GTM (which is what I'm converting from), you would set up a trigger on that element, and fire a GA event based on that (with for example Event Category = LeadForm and Event Action = Submit).

 

How do I set up Tealium to listen to the data layer and automatically trigger a GA event when the submit value is pushed into the data layer as you would in GTM?

 

Thanks,
Christopher

3 REPLIES 3

Automatic Trigger based on data layer value

Tealium Employee

Hi @Christopher_M

 

Instead of just setting a value, you'll need to call a function utag.link or utag.view. You can find the documentation here.

 

Cheers,

-Dan

Automatic Trigger based on data layer value

Gold Contributor
Gold Contributor

Hi Dan,

 

I'd like to set this up so that Tealium automatically fires a utag.link call to GA when this value is pushed to the data layer, without having to write extra code to do so.  Is there a way using mapping that will send the data to GA without writing all this extra javascript?

 

Cheers,

Christopher

Automatic Trigger based on data layer value

Tealium Employee

Hi @Christopher_M

 

Thanks for the extra info. I would suggest you make use of the jQuery onHandler Extension or following the directions for Event Tracking with Google Analytics.

 

These two posts will explain everything you need!

Public