Unifying Data Across Sources
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 segment, 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 segment events for shopify sites, these identifiers should be added as cart attributes if using the shopify storefront api, this can be done using the cartattributesupdate https //shopify dev/docs/api/storefront/2023 10/mutations/cartattributesupdate mutation chord's analytics library for shopify themes docid\ f1gguyhqkivbdbbotadzs saves identifiers as cart attributes automatically if you're using this library, you don't need to do anything else at minimum, a cart attribute named segmentid or cdpanonymousid must be added with the value being the anonymous id assigned to the user in the browser 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 https //segment com/docs/connections/sources/catalog/libraries/website/javascript/#ready if using google destinations, add an attribute with the key googleclientid or googleclientid and the value getcookie(' ga') substring(6) note getcookie is not a native javascript function and needs to be implemented see an example implementation https //developer mozilla org/en us/docs/web/api/document/cookie 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