Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

event serialization using custom code

Avatar

Level 6

I am new to event serialization and could use some helpful tips from the community.

I read that to implement event serialization, just provide a unique ID for the event, for example event1:1234ABCD.

Question 1: So can I use an evar as a unique ID that captures the orderID(evar49) from the page?

Would the code for the custom page code section look like this: s.events="event6:"evar49

Question 2: Also, can I write custom javascript to capture the sessionID from the url or maybe the orderID from the DOM and pass as a unique ID?:

var sendEventSerial = function(e){
var evt = 'event6:'document.getElementsByClassName("REG-MediumText")[11].innerHTML; //eg,orderID is uniqueID
s.events = evt;
}

Question 3: are there other methods or ways that are easier to capture a uniqueID. Can I use the AMC Visitor ID : 46659475091860511640041694367501312558 and if so where/how do i grab it?

Just trying to wrap my head fully around event serialization and all the methods that I can use to create a unique ID to pass to the event

thank you,

Scott

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

There are actually two types of event serialization: serialized per visit, and serialized via event ID. Both can be activated in the admin console under report suite settings.

Serialized per visit means that only the first instance of an event is counted per visit. event1 can fire on every page, but it will only be recorded once with this setting enabled.

Serialized per eventID uses the logic you stated: s.events="event1:12345" means that if Adobe Analytics ever sees another event1:12345 it will be tossed out. As long as the string in s.events comes out in the right syntax, you can use whatever value you'd like.

View solution in original post

2 Replies

Avatar

Community Advisor

Let me know if you've already gotten your answer or if you still would like input, especially since this post is about a year old.  Thanks!

Jeff

Jeff Bloomer

Avatar

Correct answer by
Employee Advisor

There are actually two types of event serialization: serialized per visit, and serialized via event ID. Both can be activated in the admin console under report suite settings.

Serialized per visit means that only the first instance of an event is counted per visit. event1 can fire on every page, but it will only be recorded once with this setting enabled.

Serialized per eventID uses the logic you stated: s.events="event1:12345" means that if Adobe Analytics ever sees another event1:12345 it will be tossed out. As long as the string in s.events comes out in the right syntax, you can use whatever value you'd like.