event serialization using custom code | Community
Skip to main content
Level 4
March 16, 2017
Solved

event serialization using custom code

  • March 16, 2017
  • 2 replies
  • 3418 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gigazelle

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.

2 replies

jeff_bloomer
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 23, 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

Gigazelle
Adobe Employee
GigazelleAdobe EmployeeAccepted solution
Adobe Employee
April 2, 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.