Highlighted

Implementing counter events with assigned integer values

Not applicable
We have a requirement to assign integer values to events, like below, b.sc_events = u.addEvent("event41=" + b.count); We have added this using an JavaScript extension and b.count is getting passed, but don't see this event41 getting fired to Omntiure; event40 regular counter event is working just fine. if (a=='link') { switch (b.contenttype) { case 'Content Copy': b.sc_events = u.addEvent("event40"); b.sc_events = u.addEvent("event41=" + b.count); break; } }
5 REPLIES 5
Highlighted

Implementing counter events with assigned integer values

Not applicable
We are using OmnitureSiteCatalyst tag - version H25 for this feature.
Highlighted

Implementing counter events with assigned integer values

Employee Emeritus
Hey Venkatachalapathy, Is there a URL and steps to reproduce where we can see this happening? The code above looks correct so I'd like to see it in action and try to find something else that could causing this. Thanks
Highlighted

Implementing counter events with assigned integer values

Tealium Employee
Hi Venkat, This is a great catch. We'll plan to update the SiteCatalyst template today with a fix. The issue is the s.linkTrackEvents was not getting set correctly to include event41. Thanks again for providing detailed information.
Highlighted

Implementing counter events with assigned integer values

Not applicable
Thank Jared & Ty !! Looking forward for the release, so that we can start using this feature.
Highlighted

Implementing counter events with assigned integer values

Tealium Employee
You're welcome. Give us about 3-4 hours more for our release to go out tonight. (Or get the new template first thing tomorrow.) Also, the u.addEvent sets b.sc_events behind-the-scenes which allows for a little less code. And, we've added support for passing a second param to u.addEvent (that contains the value.) This may be more intuitive way to assign values to events. // Updated code: if (a=='link') { switch (b.contenttype) { case 'Content Copy': u.addEvent("event40"); u.addEvent("event41=" + b.count); // NEW: u.addEvent("event41", b.count); break; } }