How to check data after you track an event on the website and app?

If you're looking to confirm whether the CDP 365 event on your website or your app effectively captures the intended data, this document will provide valuable assistance!

To ensure accurate event tracking and data recording for Visitors or Customers, follow these steps: visit the website, execute the desired action to trigger the intendedly-checked event, and then access CDP 365 to examine the event tracking traffic and recorded data.

Let's take the 'View page' event on the website as an example.

VISIT THE WEBSITE

Execute the desired action

To successfully test the event, it is essential to identify the specific action that triggers it.

Take that action!

Whenever a page is loaded, the 'View page' event is triggered, which implies that you will have a 'View page' event recorded for every instance of viewing any page.

The desired action is 'view' any page on the website.

Check the event

Once you have performed the desired action, the event will be triggered, and you can now open the 'Inspector' or 'Inspect' tool on your desktop by clicking the right-hand mouse.

The panel will pop up on your screen.

To locate the CDP 365 events, please proceed to open the 'Network' tab and apply a filter using the keyword 'event?'.

By clicking on the event name, you can access the event details, where you will find the elements of the event documented in the API documentation.

Navigate to the Payload section, where you will discover the event log containing the event category (ec) and event action (ea) fields. These fields correspond to the Event category and Event Action documented in the API documentation and the settings within CDP 365.

More information of the Payload section

Within the Payload section, you can find various pieces of information, such as customer details (depending on the events), visitor information, product data (depending on the events), your CDP 365 portal ID, and other event attributes that capture the desired data.

An example of checking the 'View page' event

This is the code sample documented in your API documentation.

ec: pageview
ea: view
en: 
ev: 0
dims: {"customers":{"customer_id":"abedjjojo12313498uijaj"}}
portal_id: 23492034809
prop_id: 2918309183049
rec: 1
client_id: 0.1123082348
log_type: event
uid: 10502123132
aid: 10502111231
cvar: {"page_type":"category","page_category":"Dép thời trang","pv_id":"",
"session_id":0,"prop_id":2918309183049,"visitor_type":"returning","is_webview":false,
"location_url":"https://abcdef.com/main-cate-page/sub-cate-page.html?page=1",
"referrer_url":"https://abcdef.com/","click_bc":"1239308095830942",
"utm_source":"google.com","utm_medium":"referrer","utm_type":"referrer",
"atm_source":"accesstrade","atm_type":"on_session",
"identify_type":"predict","page_title":"Sub cate page"}

You verify the event that was triggered on your 'Homepage'.

In the event details, you can find

  1. Dims: encompass the customer data, which serves as an optional event element. This element is only available if CDP 365 can detect the identifying information of the visitor.

  2. Portal_id: The ID assigned to your CDP 365 portal, which aids Antsomi in effectively managing our clients.

  3. Prop_id: The ID associated with your CDP 365 source, facilitating efficient source management on your part.

  4. UID: The Visitor ID in CDP 365 is generated by utilizing a browser cookie.

  5. Page type and Page category are two crucial event attributes that identify the specific pages you are currently on. These attributes play a significant role in verifying the accuracy of event tracking. In the image, you will find the keyword 'Home' used as the page type and page category.

  6. Other event attributes can be customized based on your specific data requirements.

Notes: Each event element is crucial, and if any element records incorrect data compared to what you observe on the screen, it indicates a failure in event tracking.

You verify the event that was triggered on your 'Fashion Shoes page'.

For instance, when the 'View page' event is triggered within a specific page category, it records the keyword 'category' for the page type and 'Dép thời trang' ('Fashion shoes') as the page category.

ACCESS CDP 365

To examine the event tracking data in CDP 365, navigate to the Event Sources section.

Log into the CDP 365 system. Hover your mouse over Data on the left hand side menu → Choose Event Sources.

Choose the source that corresponds to the event occurrence, which aligns with the prop_id you observed in the event details on the website.

To verify the prop_id, navigate to the "Setting" tab.

Examine the event tracking log

To confirm the event details obtained from the website, navigate to the 'Events' tab and choose a specific event for verification.

Let's get back to the 'View page' event.

From this panel, you will find event logs recorded from the 'Website' source specifically for the 'View page' event within the last 6 hours.

To locate your traffic, filter the 'uid' obtained from your website.

Click on an event log to access its detailed information.

Compare the information in the event log with the details provided on your website. If they match, the event tracking works properly.

Examine the user activities

Once we have ensured correct event tracking in CDP 365, the next step is to verify whether the data is appropriately updated for the respective Visitor and Customer in CDP 365.

First, check the Visitor profile and apply a filter using the 'uid' to locate the specific profile.

Apply a filter to your User ID (uid) in order to narrow down the results.

Click on the User ID to access the Visitor profile

Review the activities recorded in the Visitor Profile. If the action and date/time of event occurrence are accurately recorded, it indicates that the data update is functioning correctly.

Next, check the Customer profile and apply a filter using the 'customer id' to locate the specific profile. The checking can only occur if the customer ID is available.

Review the activities recorded in the Customer Profile. If the action and date/time of event occurrence are accurately recorded, it indicates that the data update is functioning correctly.

We go to check the 'View product' event.

For other event checks, the steps will be similar to the process of checking the 'View page' event.

This is the code sample documented in your API documentation.

ec: product
ea: view
en: 
ev: 0
items: 
[{"type":"product","quantity":1,"sku":"311120234","page_url":
"https://abcdef.com/main-cate.html",
"image_url":"https://www.abcdef.vn/media/catalog/product/b/imain-cate.jpg",
"name":"Hat - Hat for beauty","id":"311120016",
"magento_product_id":"5239","price":300,"brand":"","currency":"USD",
"main_category":"Fashion","category_level_1":"Hat",
"category_level_2":"Women hat","category":"Moonlight"}]
dims: {"customers":{"customer_id":"194879udjshduq9834u0"}}
portal_id: 5642133
prop_id: 56492346
rec: 1
client_id: 0.162342347
log_type: event
uid: 1121343242
aid: 1166324234
cvar: {"customer_id":"194879udjshduq9834u0","revenue":300,"currency":"",
"order_id":"","pv_id":"16w324232421-0","session_id":"233424",
"prop_id":"56492346","visitor_type":"returning",
"is_webview":false,"location_url":"https://www.abcdef.vn/hat-moonlight-women.html",
"referrer_url":"https://www.abcdef.vn/",
"click_bc":"110828111234567890","utm_source":"media-template.antsomi.com",
"utm_medium":"referrer","utm_type":"referrer","atm_source":"antsomi",
"atm_type":"on_session","identify_type":"exact"}

To verify the 'View product' event, visit the website and view a random product on the product detail page. Then, open your Inspector tool and locate the event details within the Payload section.

The desired action is 'view a product detail page'.

Notes: For events related to products, the event details include an 'items' element to record the relevant product information such as product name, price, and SKU ...

Next, navigate to CDP 365 and select the relevant source and event.

Notes: Remember to apply a filter using your 'uid'.

Review the activities recorded in the Visitor Profile. If the action and date/time of event occurrence are accurately recorded, it indicates that the data update is functioning correctly.

Review the activities recorded in the Customer Profile. If the action and date/time of event occurrence are accurately recorded, it indicates that the data update is functioning correctly.

We go to check the 'Search product' event.

This is the code sample documented in your API documentation.

ec: browsing
ea: product_search
en: 
ev: 0
items: [{"type":"product","sku":"123456789","quantity":1,"name":"Hat Moonlight","id":"61411234","magento_product_id":"115123","price":300,"brand":"",
"currency":"USD","main_category":"FASHION","category_level_1":"","category_level_2":"","category":"FASHION","position":1},
{"type":"product","sku":"614112345","quantity":1,"name":"Hat Sunlight ","id":"614141234","magento_product_id":"42012","price":233,"brand":"",
"currency":"USD","main_category":"FASHION","category_level_1":"Fashion for kids","category_level_2":"","category":"Fashion - kids","position":2},
{"type":"product","sku":"61412234","quantity":1,"name":"Hat for sleeping beauty ","id":"614122134","magento_product_id":"115123","price":200,"brand":"",
"currency":"USD","main_category":"FASHION","category_level_1":"","category_level_2":"","category":"FASHION","position":3},
{"type":"product","sku":"614121234","quantity":1,"name":"Hat for ocean","id":"614121234","magento_product_id":"115123","price":100,"brand":"","currency":"USD",
"main_category":"FASHION","category_level_1":"","category_level_2":"","category":"FASHION","position":4}]
dims: {"customers":{"customer_id":"123jajo2u39002jksdj90238"}}
portal_id: 564123456
prop_id: 56499123456
rec: 1
client_id: 0.1688099767
log_type: event
uid: 1108281165
aid: 1166059578
cvar: {"src_search_term":"hats","page_type":"search","customer_id":"123jajo2u39002jksdj90238","pv_id":"168812345678990-0","session_id":"2389161234",
"prop_id":"56499123456","visitor_type":"returning","is_webview":false,"location_url":"https://abcdef.vn/catalogsearch/result/?q=hats",
"referrer_url":"https://abcdef.vn/hats.html","click_bc":"1108281165b123456789","utm_source":"media-template.antsomi.com",
"utm_medium":"referrer","utm_type":"referrer","atm_source":"antsomi","atm_type":"on_session","identify_type":"exact"}

To verify the 'Search product' event, visit the website and search for a keyword. Then, open your Inspector tool and locate the event details within the Payload section.

The desired action is 'search for a product'.

  • For events related to products, the event details include an 'items' element to record the relevant product information.

  • According to the business requirement, the 'Search product' event is designed to track the details of multiple products. The exact number of products returned by the event is specified in the API documentation.

Next, navigate to CDP 365 and select the relevant source and event.

Notes: In the event log details, you can find the searched keyword you were looking for on the website.

Review the activities recorded in the Visitor Profile. If the action and date/time of event occurrence are accurately recorded, it indicates that the data update is functioning correctly.

Notes: You can follow the aforementioned steps to check the Customer Profile.

We go to check the 'Add to cart' event.

This is the code sample documented in your API documentation.

ec: product
ea: add_to_cart
en: 
ev: 0
items: [{"item_type":"product","id":"1234567adb9","sku":"1234567adb9","haravan_product_id":"1047818301","variant_id":"123456789","barcode":"AB128309ASJJJK","name":"SHIRT","original_price":200,"price":120,
"brand":"Sun","main_category":"Shirt","available":"true","page_url":"https://Shirt.vn/products/sun-shirt","image_url":"https://product.sun.net/200000053174/product/1234567890_master.png",
"tags":["breadcrumb_shirt","sale","label_FLASHSALE_#FF0000","shirt"],"type":"product","quantity":1,"event_update":"add_to_cart"}]
portal_id: 564812345
prop_id: 5649912345
rec: 1
client_id: 1064726012.123456789
log_type: event
uid: 1064708247
aid: 1064726012
cvar: {"total_price":120,"cart_subtotal":120,"cart_item_count":1,"source":"product_detail","revenue":120,"currency":"","order_id":"","pv_id":"1688512345678-0","session_id":"59281234567","prop_id":"5649912345",
"visitor_type":"returning","is_webview":false,"location_url":"https://sun.vn/products/shirt",
"referrer_url":"https://sun.vn/","utm_source":"google.com","utm_medium":"referrer","utm_type":"referrer","atm_type":"on_session"}

The desired action is 'add to cart a product'.

Next, navigate to CDP 365 and select the relevant source and event.

We go to check the 'Checkout' event.

This is the code sample documented in your API documentation.

ec: product
ea: checkout
en: 
ev: 0
items: [{"item_type":"product","id":"1234567adb9","sku":"1234567adb9","haravan_product_id":"1047818301","variant_id":"123456789","barcode":"AB128309ASJJJK","name":"SHIRT","original_price":200,"price":120,
"brand":"Sun","main_category":"Shirt","available":"true","page_url":"https://Shirt.vn/products/sun-shirt","image_url":"https://product.sun.net/200000053174/product/1234567890_master.png",
"tags":["breadcrumb_shirt","sale","label_FLASHSALE_#FF0000","shirt"],"type":"product","quantity":1,"event_update":"add_to_cart"}]
portal_id: 564812345
prop_id: 5649912345
rec: 1
client_id: 1064726012.123456789
log_type: event
uid: 1064708247
aid: 1064726012
cvar: {"total_price":120,"cart_subtotal":120,"cart_item_count":1,"source":"product_detail","revenue":120,"currency":"","order_id":"","pv_id":"1688512345678-0","session_id":"59281234567","prop_id":"5649912345",
"visitor_type":"returning","is_webview":false,"location_url":"https://sun.vn/products/shirt",
"referrer_url":"https://sun.vn/","utm_source":"google.com","utm_medium":"referrer","utm_type":"referrer","atm_type":"on_session"}

The desired action is 'check out the cart'.

Next, navigate to CDP 365 and select the relevant source and event.

Notes:

  • Please ensure that the 'Checkout cart' event accurately tracks essential revenue-related details, including quantity, price, total price, subtotal, revenue, and discount. Detailed documentation regarding this information can be found in the API documentation.

  • You can follow the aforementioned steps to check either the Visitor Profile or the Customer Profile.

We go to check the 'Purchase' event.

This is the code sample documented in your API documentation.

ec: product
ea: purchase
en: 
ev: 0
items: [{"item_type":"product","id":"12345abc","name":"","line_price":1234,"line_price_orginal":1234,"price":1500,"original_price":1500,"quantity":5,"type":"product"}]
dims: {"purchase":{"customer_id":"123asd123asd123asd","customer_name":"Name","phone":"1234567123","shipping_province":"City","shipping_district":"District","id":"1234523","name":"1234523",
"order_number":"123123123","discount_amount":0,"discount_code":null,"payment_method":"COD","total_price":1234,"revenue":1234,"subtotal_price":1234,"order_id":"14676123"},
"customers":{"phone":"1234567123","email":"name@gmail.com","customer_name":"Name","customer_id":"123asd123asd123asd","province":"City","address":"123",
"district":"District","identify_event":"purchase","identify_time":"2023-07-05 09:36:12","visitor_id":"123123123"}}
portal_id: 564881234
prop_id: 564991234
rec: 1
client_id: 1176780170.123123123
log_type: event
uid: 1176763211
aid: 1176783211
cvar: {"order_id":"123123123","revenue":1234,"customer_id":"123asd123asd123asd","identify_event":"purchase","identify_time":"2023-07-05 09:36:12","currency":"","transaction_id":"ts_1688524512345","pv_id":"16885242123456-0","session_id":"2565712345","prop_id":"564991234","visitor_type":"returning","is_webview":false,"location_url":"https://abcdef.com.vn/checkouts/b7ec7d265a064d2b8d908e1234oo022/thank_you","referrer_url":"https://abcdef.com.vn/checkouts/b7ec7d265a064d2b8d908e1234oo022","atm_type":"on_session","identify_type":"exact"}

The desired action is 'purchase your cart'.

Next, navigate to CDP 365 and select the relevant source and event.

Notes:

  • Please ensure that the 'Purchase' event accurately tracks essential revenue-related details, including quantity, price, total price, subtotal, revenue, and discount. Detailed documentation regarding this information can be found in the API documentation.

  • You can follow the aforementioned steps to check either the Visitor Profile or the Customer Profile.

We go to check the 'Identify User' event.

This is the code sample documented in your API documentation.

ec: user
ea: identify
en: 
ev: 0
dims: {"customers":{"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a"}}
portal_id: 564881234
prop_id: 564991234
rec: 1
client_id: 1176780170.1681233432
log_type: event
uid: 1176766123
aid: 1176780123
cvar: {"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a","identify_time":"2023-07-05 11:24:16","identify_event":"user_identify","pv_id":"1688530754220-0","session_id":"2565745033","prop_id":"564990804","visitor_type":"returning","is_webview":false,"location_url":"https://anstomi.com.vn/account","referrer_url":"https://antsomi.com.vn/account","atm_type":"on_session","identify_type":"exact"}

The desired action is 'sign in' or 'sign up' or 'check out the cart'.

Notes: This event is triggered to align with the specific business requirements and guidelines specified in the API documentation. It can be triggered during various actions such as signing in, signing up for an account, or checking out the cart. Its purpose is to facilitate the identification of the customer ID in CDP 365 and associate it with the corresponding visitor ID.

Next, navigate to CDP 365 and select the relevant source and event.

Notes: You can follow the aforementioned steps to check either the Visitor Profile or the Customer Profile.

We go to check the 'User Sign In' event.

This is the code sample documented in your API documentation.

ec: user
ea: sign_in
en: 
ev: 0
dims: {"customers":{"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a"}}
portal_id: 564889906
prop_id: 564990804
rec: 1
client_id: 1176780170.1688524205
log_type: event
uid: 1176766141
aid: 1176780170
cvar: {"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a","identify_time":"2023-07-05 11:24:16","identify_event":"sign_in","pv_id":"1688530754220-0","session_id":"2565745033","prop_id":"564990804","visitor_type":"returning","is_webview":false,"location_url":"https://anstomi.com.vn/account","referrer_url":"https://anstomi.com.vn/account","atm_type":"on_session","identify_type":"exact"}

The desired action is 'create a new account'.

Next, navigate to CDP 365 and select the relevant source and event.

Notes: You can follow the aforementioned steps to check either the Visitor Profile or the Customer Profile.

We go to check the 'User Sign Up' event.

This is the code sample documented in your API documentation.

ec: user
ea: sign_up
en: 
ev: 0
dims: {"customers":{"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a"}}
portal_id: 564889906
prop_id: 564990804
rec: 1
client_id: 1176780170.1688524205
log_type: event
uid: 1176766141
aid: 1176780170
cvar: {"name":"NAME","phone":"012830981923","email":"name@gmail.com","customer_id":"300b977e484268a34123817438971a","identify_time":"2023-07-05 11:24:16","identify_event":"sign_up","pv_id":"1688530754220-0","session_id":"2565745033","prop_id":"564990804","visitor_type":"returning","is_webview":false,"location_url":"https://anstomi.com.vn/account","referrer_url":"https://anstomi.com.vn/account","atm_type":"on_session","identify_type":"exact"}

The desired action is 'sign in to your website account'.

Next, navigate to CDP 365 and select the relevant source and event.

Notes: You can follow the aforementioned steps to check either the Visitor Profile or the Customer Profile.

CHECK THE EVENT TRACKING ON YOUR APP

The process of checking event tracking on the app is similar to that on the website.

One step that differentiates between the two platforms is how you can find your event log in CDP 365.

To ensure accurate event tracking and data recording for Visitors or Customers, follow these steps:

Note: During this step, it's important to note that you won't have access to the Inspector tool to directly review the event element. Unlike the website environment where you can utilize browser tools like the Inspector to examine event details, this capability is not available when working with the app.

Note: In CDP 365, the event log can be filtered based on your login information (for the purchase event) or your customer ID (for other events), which may vary depending on the required login details. This typically includes either a phone number or an email address associated with your account.

To locate your customer ID, access the Customer Business Object in CDP 365 and filter by your login information.

Find your 'View product' event log

Find your 'Purchase' event log

Last updated