- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
03-26-2015 03:17 AM
03-26-2015 03:30 AM - last edited on 10-06-2015 01:58 PM by kathleen_jo
Hey Jarno,
From my tests, it shouldn't matter whether you trigger u.addEvent() multiple times for the same event unless you're setting a numeric event.
e.g. if I trigger u.addEvent("event10"); 8 times then I'll still only fire one event10 when the call eventually fires (http://note.io/19To8Ou).
However, if you were setting numeric events then you might have an issue:
e.g. if I trigger u.addEvent("event10=100.00"); and then u.addEvent("event10=200.00"); then I'll get two event10s set with different values (http://note.io/1Iy4EtX) although I do wonder whether SiteCatalyst will handle this for you (possibly not)
One way you could do this is to loop through the variable b.sc_events to see what is set and then don't set it if it is already set (or delete the old value and then use u.addEvent to set a new value):
http://note.io/19Tom86
Hopefully, this should help?
Cheers,
Roshan
03-26-2015 06:56 AM - last edited on 10-06-2015 01:58 PM by kathleen_jo
Hi Roshan, thank you for your support.
Probably I faced to duplicate event (no-numeric) when both u.addEvent and data-mapping work on the same tracking call. Anyway, I'm wondering if I can check whether or not an event is placed into the server call, before I call u.addEvent...
03-31-2015 07:04 AM - last edited on 10-06-2015 01:59 PM by kathleen_jo
Hi Jarno,
Apologies for the delay, you can check b.sc_events to see what events have been stacked so far by u.addEvent() but if you have any normal mappings in Tealium to trigger events I'm afraid you won't be able to see these.
I'm not sure I understand the purpose of checking though - if it is already set then setting it again wouldn't have any adverse effect as it would just set it again).
Could you confirm?
Thanks,
Roshan
03-31-2015 09:27 AM - last edited on 10-06-2015 01:59 PM by kathleen_jo
Hi Roshan,
thanks for the hit on b.sc_events
I'm turning from data mapping to u.addEvent() method because I'm need to use a custom and more advanced method to get tracking of events, so sometimes happens that I have both the previous and the new method on the same page, so for instance, "cart-to-add" is fired twice instead of once.
Anyway, thanks for your support.
03-31-2015 09:51 AM - last edited on 10-06-2015 01:59 PM by kathleen_jo
That's strange Jarno - I can't replicate that. Could you confirm that you're seeing 'scAdd' firing twice in the same call? Also, could you confirm the version of the SiteCatalyst tag you are using and the account/profile and a URL to test?
Thanks,
Roshan
11-10-2016 07:52 AM
11-14-2016 08:00 AM - last edited on 11-14-2016 10:22 AM by kathleen_jo
Hi @00pritchard,
You should just be able to set the props and eVars directly. For example, say you have foo
mapped to prop1 and eVar 1. You can set foo
to text "bar"
using a Set Data Value extension under the same conditions as when you are using the u.addEvent
method.
Copyright All Rights Reserved © 2008-2023