- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi,
I'm wondering how to set numeric events in an Adobe Analytics tag. Normally, you'd set event50=1234, and then include event50 in the event list. But how do we do it in Tealium iQ?
Thanks
Solved! Go to Solution.
06-20-2016 02:58 AM - last edited on 06-20-2016 09:00 AM by kathleen_jo
Hi @andrew_leigh,
I think this article answers your question:
https://community.tealiumiq.com/t5/Tags-and-Client-side/Adobe-Analytics-SiteCatalyst-Tag/ta-p/664
Thanks
Steve Lake
Thanks Steve. Unfortunately there is not enough information in that post about Numeric Events specifically.
For anyone else looking for a solution, we got this back from Tealium support. Let's say that the source of the number you want to record is a JS variable called "sourceNumber" and the numeric event you want to set is event1. Leave the event unmapped in the Adobe Analytics tag and just add this in a JavaScript Code extension:
if (sourceNumber !== undefined) {
u.addEvent("event1","" + sourceNumber);
}
Remember to scope the JavaScript Code extension to the Adobe Analytics / SiteCatalyst tag.
Thank you for sharing @andrew_leigh.
I see a small typepo in your code:
Just want to update in case anyone else is using your code as a reference.
if (typeof sourceNumber !== 'undefined') { u.addEvent("event1","" + sourceNumber); }
//also this will work
if (typeof sourceNumber !== 'undefined') {
u.addEvent("event1=" + sourceNumber);
}
// you can also pass in an array of strings
u.addEvent(["event1=10.50", "event2", "event3"]);
Copyright All Rights Reserved © 2008-2023