Shopify websites
Follow this guide to install Toplyne Pixel on your shopify website
Pre-Requisites
You need to be an Admin on your Shopify account to set up Toplyne's Pixel on the website
1. Install Custom Pixel
-
Go into Settings in Shopify admin. In the left navigation go into Customer events
-
Click on Add custom pixel button
-
Enter a pixel name (Example: Toplyne Pixel)
-
Copy the code snippet from your Toplyne dashboard and paste it as shown in the next step
!function(e,t,l,n){e.tl=e.tl||function(...t){(e.tl.queue=e.tl.queue||[]).push(t)};let s=t.createElement(l);s.src=n;let o=t.getElementsByTagName(l)[0];o.parentNode.insertBefore(s,o)}(window,document,"script","https://toplyne-sdk.toplyne.io/shopify.js"); tl('init', browser, init, '<API Token>'); analytics.subscribe("all_events", event => tl('track', event, browser, init));
-
Paste the above code in the Code section and then click Save
-
Click on Connect and you are done
-
In Customer events section, the custom pixel should be visible with Connected status
Once this is done, proceed to install Javascript SDK on Shopify
2. Install SDK
-
Go into Online Store > Themes in Shopify admin
-
Click on 3 dots next to Customise button and then click on Edit code
-
Click on </> theme.liquid on the left hand panel
-
Find the body tag
-
Copy the SDK code snippet from your Toplyne dashboard
<script src="https://toplyne-sdk.toplyne.io/index.js?token=<APIKey>" defer></script>
-
Paste the copied code snippet before the end of body tag
-
Save the changes
Once this is done, proceed to add the script on order status page
3. Add script on Order Status Page
-
Go into Settings in Shopify admin. In the left navigation go into Checkout
-
Scroll down and look for Order status page additional scripts. In that section, look for Additional scripts input box
-
Copy the script code from your Toplyne dashboard
<script src="https://toplyne-sdk.toplyne.io/index.js?token=<APIKey>" defer></script>
-
Add the Toplyne script on a new line at the end of the input box
-
Click on Save button
Updated 3 months ago