event serialization using custom code

scottt6073095 16-03-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Gigazelle
Employee
02-04-2018

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.

Answers (1)

Answers (1)

jeff_bloomer 23-03-2018

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