Expand my Community achievements bar.

AEP merging events based on their timestamp?

Avatar

Community Advisor

Hi Team,

In the XDM ExperienceEvent class documentation its says that "some interactions may result in multiple related events that technically share the same event timestamp, and can therefore be represented as a single event record"

XDM.jpg

 

What does this mean? Doesn't AEP generate separate _id for all events and track the uniqueness of an individual event using this field?

What could be the scenarios where AEP treats two events as a single event record as mentioned in the documentation?

Thanks

 

6 Replies

Avatar

Community Advisor

@Harveer_SinghGi1 , the way I look at this is if user's one action is resulting into one event (Single hit) that represents two potential action (product view, page view),  platform gives you liberty to pick only attributes that matters to you most. This doesn't change the way platform originally captures each event and identifies each event uniquely by _id.  

Avatar

Community Advisor

Hi @AtulChavan ,

So just to clarify, assuming there are two events originating from a single user action and have same timestamp, are you are saying I can enrich one event by attributes from another and

  1. Have one event in AEP with merged attributes based on may data prep and other with it's own attributes? or
  2. Have one event in AEP with merged attributes based on may data prep and drop the other event?

Also, I thought data prep worked on event level. Can I access the contents of other events and merge it in current event? How is that possible, can you provide some example of the logic/function that can achieve this?

Thanks

Avatar

Community Advisor

Re-edited original answer to avoid confusion. You can't enrich event once ingested ; while being at data prep (before ingesting event) you can add another field that would help to implement some logic to play around when multievent record comes. 

Example
Event 1 : Product View + Page View (Multi event record)
Data prep : Here you may implement a logic that manipulates event type as "Product View".  (Highlighted in documentation already). 

Avatar

Community Advisor

Hi @AtulChavan ,

This is exactly what my question is, what do you mean by "multi event record"?

Wouldn't a record have only one event tied to it under xdm.eventType field, either Product View or Page View? Or am I misunderstanding something and this field can contain both Product View and Page View in a single record? If not, what is the role of data prep here because I'll anyway have to decide between Product View or Page View in xdm.eventType at the time of data ingestion.

Thanks

Avatar

Community Advisor
I understand its quite confusing, let me try one more time -  point you're missing is when users action result into two potential events (clubbed together into single event referred as multi event record) - you can use data prep whether such event to be stored as product view event or page view event by keeping relevant attributes that you care about. Pasting sample payload of multievent record.

{
"ecid": "12345",
"_id": "123344567",
"eventType": "Multievent Record",
"timestamp": "2023-10-05T14:30:00Z",
"Page view": {
"page_title": "Product Listing Page",
"referrer_url": "https://example.com/home",
"device_type": "desktop",
"browser": "Chrome",
"os": "Windows 10"
},
"product view":{
"event_timestamp": "2023-10-05T14:31:00Z",
"product_id": "prod_67890",
"product_name": "Wireless Bluetooth Headphones",
"product_category": "Electronics/Audio",
"product_price": 99.99,
"currency": "USD",
"device_type": "desktop",
"browser": "Chrome",
"os": "Windows 10"
}
}

Avatar

Administrator

@Harveer_SinghGi1 Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni