Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Silver Contributor
Silver Contributor
Probably a simple and dumb question, but I cannot figure this out. On one of my dev pages, I have a Tealium container that sets the variable sc_events: "event12". In my Site Catalyst tag, I set sc_events to fire event12 (event12:event12) when the page loads. However, when I load the page, it outputs "0,1,2,3,4,5,6" in the SC event variable call. I've even removed the variable assignment on the SC tag (event12:event12) and it still outputs "0,1,2,3,4,5,6". Any suggestions on what could be the issue? I've checked my extensions and none of them is using sc_events on the page. Any help is appreciated, thanks!
7 REPLIES 7
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Employee Emeritus
This usually means that you are setting a string in the sc_events variable. The sc_events variable is looking for an object (i.e. sc_events = {"event12":"1"} instead of a string sc_events = "event12" In the utag_data object you are setting sc_events as a string. This is why you still get the "0,1,2,3,4,5,6" when you remove the mapping. There are a couple things you can do: 1) Change the name of the variable in the utag_data object to "event" instead of sc_events. Then use event in the mappings just as you have sc_events. 2) Remove the mapping and add a Set Variables Extension that says: Set sc_events to javascript {"event12":"1"} when sc_events equals/contains "event12" 2) Change the value of sc_events to an object in the utag_data object instead of a string. (i.e. sc_events = {"event12":"1"}
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Silver Contributor
Silver Contributor
Jared, you are my hero, thank you!
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Tealium Employee
Our latest tag template for SiteCatalyst also supports the following u.addEvent function: // Must be used in an Extension that is Scoped to SiteCatalyst tag u.addEvent("event12");
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Hi Ty, this looks like the solution to the problem (adding more than one event on a page) we've discussed at the TMU in San Diego. What if I want to add more than one event using this function? Is it posible to add more than one event with this function like u.addEvent("event12", "event13"); or do I have to use it for each single event separately u.addEvent("event12"); u.addEvent("event13"); ?
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Tealium Employee
Hi Matthias, thanks for posting. Right now, the u.addEvent must be called separately for each event. However, this is a great idea. We'll add support for this in the next template (maybe next week?). The new function would also allow for an Array of events. u.addEvent(["event12","event13"]);
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Tealium Employee
This notation will be supported in the next SiteCatalyst H25 template. Look for the new template on Monday. // NEW - set multiple events by passing an array to u.addEvent u.addEvent(["event12","event13"]);
Highlighted

Site Catalyst tag firing 0,1,2,3,4,5,6 when setting sc_event.

Rookie Contributor
How do I serialise the event? Can I do this: u.addEvent(["event12:id123","event13:di456"]);