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'
- Login to your Shopify account.
- Go the Shopify app store listing for Segment.com by Littledata:
- Click Add app to begin the installation process.
- Configure Segment. Log into your Segment workspace, and Connect Shopify (by Littledata):
- You will need to add your Segment workshop write key. Follow this guide to find your write key, then enter it and hit NEXT.
If you want to add the tracking code manually, please continue reading section B) below
A) Automatic route
- 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:
- 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
- Select the Manual route to paste the code manually into your Shopify layouts and click next:
- You will then be instructed to add the scripts to your code. Click COPY, which will copy the script to clipboard:
- 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.
- Then you will copy the three-line code and paste the snippet in every one of your store’s Layouts, just above the tag. In the example below, we’ll paste the snippet in row 75:
- 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 email@example.com if anything is unclear.