Littledata provides a Segment connection for Shopify and Shopify Plus. The app automatically fixes ecommerce tracking and lets you use Shopify as a Segment source. It automatically tracks key events and page views, then sends that data to Segment.
How to install ‘Segment.com by Littledata’
1. Login to your Shopify account.
2. Go the Shopify app store listing for Segment.com by Littledata:
3. Click Add app to begin the installation process.
5. You will need to add your Segment workshop write key. Follow this guide to find your write key, then enter it and hit NEXT.
Note: if you want to add the tracking code manually, please continue reading section B) below
A) Automatic route
1. Select the Automatic route to add the tracking code automatically. The tracking code and Segment’s analytics.js library will be automatically added to your store:
2. Installation is complete! You will now start receiving data from Shopify to Segment, including sales data and checkout steps:
B) Manual route
Manual installation requires you to paste Littledata’s code into your store layout. This is recommended for projects under source control, as it ensures that our code will not be overwritten when you make site updates
1. Select the Manual route to paste the code manually into your Shopify layouts and click next:
2. You will then be instructed to add the scripts to your code. Click COPY, which will copy the script to clipboard:
3. Go to your Shopify Admin > Online Store > Themes > Actions > Edit code and create a new snippet named LittledataLayer. Paste the script you copied in the previous step, and click Save.
4. Then you will copy the three-line code and paste the snippet in every one of your store’s Layouts, just above the </head> tag. In the example below, we’ll paste the snippet in row 75:
5. After you finish the above steps, hit NEXT. You will now start receiving data from Shopify to Segment, including sales data and checkout steps.
You will now be able to send data from Shopify to hundreds of Segment destinations. You can send data from Segment to Google Analytics by following the steps described here.
Please see our Segment FAQ for answers to common questions. You can email the Littledata team at firstname.lastname@example.org if anything is unclear.