Shopify Custom Web Pixel

Deploy Eulerian Marketing Platform on your Shopify store in minutes!
In summary : the proposed Eulerian integration is a manual insertion of JavaScript code as a “custom pixel”.
It allows for the automatic collection of events such as page views, additions to cart, and purchases, and then sends this data to the Eulerian platform.




How to integrate Eulerian into your store

    Installation on Shopify – The repository contains a custom pixel (a JavaScript tag) to copy into Shopify. This is not an app published in the Shopify App Store. To install it:
  • Prepare the configuration by indicating its Eulerian tracking subdomain in the CONFIG constant.
  • In the Shopify admin interface, go to Settings → Customer events , then Custom pixels → Add pixel and add the full JavaScript code from snippet/generic.js .
    Automatic creation of a DataLayer – the script manages the data collection for Eulerian itself.
When an order is completed, the handleCheckoutCompleted function builds an EA_datalayer array with the customer ID ( uid ), event type, order reference, amount, currency, and items purchased.
It then transmits this data to Eulerian's EA_collector API.
    Event and conversion collection – the code uses Shopify's Web Pixels API.
Upon loading, it imports the Eulerian tracking script ( ea.js ) and then subscribes to the standard events: page_viewed , product_viewed , product_added_to_cart , and checkout_completed . For each event received, it builds an array of parameters and calls window.EA_collector to send the data to Eulerian. For example:
  • For a page display, it simply sends the client ID and event type;
  • For an addition to the cart, it sends the ID, name, price and category of the product;
  • For a purchase, it creates an EA_datalayer object with the order details (order id, amount, currency, item line) and transmits it via EA_collector .