Integration with Shopify headless store
Special Reporting Scenarios:
Some events, such as checkout started, need to be reported from within Shopify itself, not just the frontend. To capture these events, event listeners need to be added within Shopify itself.
How to add listeners in Shopify:
- Go to the custom event menu and select Add Custom Pixel.
- Initialize the JavaScript Pixel SDK (make sure HTML is excluded from the setup). To obtain the Pixel ID for your Shopify store, refer to the AfterShip Pixels documentation (for merchants). Replace
<AfterShipPixelId>with the Pixel ID you obtained.
preparing...
- Subscribe to customer events with analytics.subscribe() and add event tracking:
preparing...
Required tracking events for attributed revenue calculation
To accurately track and calculate the revenue attributed to your Branded Tracking Page, the following event triggers must be implemented:
- ASPixel.events.pageViewed()
- ASPixel.events.itemViewed()
- ASPixel.events.itemClicked()
- ASPixel.events.addedToCart()
- ASPixel.events.checkoutStarted()
- ASPixel.events.purchaseCompleted()