I have multiple buttons "Buy Now" on a homepage. All the "Buy Now" buttons takes the user to "same" next page (product details)
I don't have any dataLayer on the page so I am using CSS selectors to trigger Adobe Analytics event.
I am using 'show' (not click) and fire adobe analytics "event 1". So multiple time we are firing "event 1" as there are multiple buttons.
Is there anyway I can serialize the event? e.g. pass event1:1234. Do I just create a timestamp or? what are my options to count it as a single event per pageview?
I think this is what you're looking for: https://marketing.adobe.com/resources/help/en_US/sc/implement/event_serialization_impl.html
Here is an excerpt :
To use Event serialization, you must first enable it in
Admin > Report Suite > [select report suite] > Edit Settings > Success Events
. Then select which events you want recorded in the Unique Event Recording column. There are three different settings an event can be set to.Always record event: This is the default behavior of all events when initially enabled. All events included in image requests will be sent directly to Analytics, including page reloads.
Record once per visit: An event with this setting enabled will only track the first instance of that event in a given visit. Once a new visit starts, each event with this setting enabled can be tracked again. This is an effective way to mitigate duplicate events via browser refreshes.
Use event ID: This setting allows the capability to associate each event with a unique ID. If Analytics sees an eventID it has already seen before with that variable, it will not be counted in reporting.
Alternatively, we use the appendList plugin which makes this completely painless. Ensuring a non-duplicate event is as simple as this:
s.events = s.apl(s.events, "event999", ",", 1);
Here is a link to that plugin: https://marketing.adobe.com/resources/help/en_US/sc/implement/appendList.html