Integration with Shopify headless store

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:

  1. Go to the custom event menu and select Add Custom Pixel.
  1. 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...
  1. Subscribe to customer events with analytics.subscribe() and add event tracking:
preparing...

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()