Chord Commerce Event Tracking
Guides

Unifying Data Across Sources

2min
chord’s standard data implementation includes events being sent to the cdp from, at minimum, a website front end and a server source to ensure these events are associated to the same user record in the cdp, the website front end needs to save a few browser identifiers as attributes on the cart or order, so they can be retrieved later by the server source and included in cdp events shopify for shopify sites, these identifiers should be added as cart attributes if using the shopify storefront api in a headless architecture, this can be done using the cartattributesupdate mutation if you are using the shopify web pixel in a store that uses a liquid theme, you'll want to add the following script to your liquid theme others at minimum, a cart attribute named cdpanonymousid must be added with the value being the anonymous id assigned to the user in the browser when using segment, this id can be found by calling window\ analytics user() anonymousid() on any page where segment’s javascript is present it won't be available until after segment has been initialized, so you may want to wait for the analytics ready callback if using google destinations, add an attribute named googleclientid with the value getcookie(' ga') substring(6) note getcookie is not a native javascript function and needs to be implemented see an example implementation add these attributes to the cart before the customer navigates to checkout ideally, if adding these attributes requires an api request, add these attributes at a time that doesn’t block user interaction with your site, like when the cart page loads or after a product is added to the cart