sc_events in a utag.link call

Silver Contributor
Silver Contributor

I have to use a utag.link() call in a javascript extension for various reasons. I have to pass an event within the utag.link call as well but not sure how to do that given the necessity of using sc_events. If I pass it as "sc_events":"event125" then I get the usual events = "0,1,2,3,4,5,6" but there is no way to set the correct way of "sc_events":{"event125":"1"} like you are supposed to follow in a Set Data extension.

utag.link({"content.form.formStep":pageDataLayer.content.form.formStep,"content.form.formName":pageDataLayer.content.form.formName,"sc_events":{"event126":"1"}});

 

1 REPLY 1

sc_events in a utag.link call

Tealium Employee

Unless you've modified anything, you should be able to just map a variable to send the event when the correct value is populated. For example, let's say I want to send "event125" when the "event_name" variable equals "cart_view". I would add a mapping to the Adobe tag to send "event125" when "event_name" equals "cart_view". The mapping would look like this when complete: "cart_view:event125". 

Once you have the mapping set up, you would ensure that your link event contains the variable with the correct value:

utag.link({"event_name":"cart_view"});

When this event sends, the mapping will then trigger the event and it will be added to sc_events. 

Jen Kaye
Senior Premium Success Engineer | Tealium, Inc.
Public