Shopify by Littledata Source


Littledata is a smart analytics app that automates ecommerce tracking. Littledata’s Shopify-to-Segment connection automatically tracks key ecommerce events on a Shopify or Shopify Plus store, so you can use Shopify as a source in your Segment workspace.

Littledata is available as an independent Shopify App. When you install the Littledata app on your store, Littledata does two things:

  1. It inserts a smart tracking script to your store’s front end. You can use this script with any custom Shopify site, and uses analytics.js under the hood to send data in a spec-compliant manner to Segment.

  2. The app also sets up server-side webhook forwarding to ensure 100% accuracy of important Customer and Order data.

Here’s an architecture diagram that shows how the Littledata app mediates data flow between Shopify and Segment.

Note

This integration is maintained by Littledata and is not supported by Segment directly. The Littledata app has been reviewed by the Segment team for conformance with the E-Commerce Spec, and is the recommended way of using Segment with Shopify. However, it does require a paid subscription with Littledata, who mediates the connection between Shopify and Segment. Contact the Littledata Support team with any questions.

Getting Started

  1. Login to your Shopify Store account.
  2. Go the Shopify app store listing for Segment.com by Littledata.
  3. Click Add app to begin the installation process.
  4. Sign up for a Littledata account using an email address, Google login or Facebook login. More team members can be added to the subscription after completing the installation process.
  5. Add the Segment write key for the source that is going to send data in the input field.
  6. Choose either an Automatic or a Manual install. Automatic installs work in most instances, but if you choose to do a manual install, just follow this guide.
  7. Segment’s analytics.js library, Littledata tracking script and webhooks will be automatically applied to the store and the installation proccess will then be complete.

Device-mode Events

Below is a table of events that Shopify by Littledata sends to Segment through the analytics.js libary. These events will show up as tables in your warehouse, and as regular events in your other Destinations supporting device-mode.

Event Name Description
Page Viewed The user has viewed a page
Product List Viewed The user has viewed a product as they scroll down the collection page
Product Clicked The user has clicked a product within a product list
Product Viewed The user has viewed a product page
Product Image Clicked The user has clicked a product image

In addition to the events tracked as standard, the following hits can be tracked based on page path:

Event Name Description
Registration Viewed A prospect has viewed the registration page
Cart Viewed A prospect has viewed the cart
Blog Viewed A prospect has viewed the blog
Registration Completed A prospect has completed registration

Cloud-mode Events

Below is a table of events that Shopify by Littledata sends to Segment from Littledata’s servers. These events appear as tables in your warehouse, and as regular events in your other Destinations that support cloud-mode. They include the anonymousId that links them to the device-mode events where the event was part of a previous user session, or associated with a userId that was previously linked with an anonymousId. See Littledata’s troubleshooting guide on attribution for more details.

Event Name Description
Product Added A user has added a product to the cart, and left it in the cart for more than 10 seconds
Product Removed A user has removed a product from the cart
Checkout Started A user has started checkout
Checkout Step Completed A user has completed a step in the checkout
Payment Info Entered A user has entered payment info
Order Completed A prospect has completed an order
Order Refunded An order has been refunded
Order Cancelled (v2) An admin has cancelled an order (including the cancel_reason)
POS Order Placed (v2) A user has placed an order through Shopify POS
Payment Failure (v2) A user completed checkout step 3 but the payment method failed (for example, the card details were valid but the [charge did not succeed(https://stripe.com/docs/testing#cards-responses)])
Customer Enabled (v2) A user has confirmed their email address and created a Shopify customer account with verified_email set as true
Fulfilment Update (v2) An order fulfilment status has changed (including status, tracking_numbers and tracking_urls where the shipping integration allows)

Identify Calls

For every event where there is an identifiable Shopify customer (from both the device-mode and cloud-mode) Littledata also sends an Identify call. This happens when the customer logs into the storefront, on the last step of the checkout, with the order, and also after purchase with any customer update in Shopify admin.

The following traits are included with an Identify call:

Property Name Description Property Type
userId The Shopify Customer ID Double
firstName The customer’s first name String
lastName The customer’s email String
email The customer’s email address String
phone The customer’s phone number String
createdAt The date customer record was created Date
description The customer notes String
address The customer’s primary address String
customerLifetimeValue The total spend of customer on the Shopify store Double
purchaseCount The bumber of orders by this customer Integer
marketingOptIn The marketing_opt_in field from Shopify customer String
tags The custom tags applied to the customer String
state Whether the customer account is enabled or disabled String
verified_email (v2) Whether the customer has verified their email Boolean

Alias Calls

To support seamless customer tracking the Mixpanel, Vero and KISSMetrics destinations, Littledata ensures the pre-checkout anonymousIdis added as an alias of the userId (used from checkout step 2 onwards).

Subscription Ecommerce Events

Additional events available through Littledata’s ReCharge connection, and available in cloud-mode destinations.

Event Name Description
Subscription Created A customer has created a subscription
Subscription Updated A customer has updated a subscription
Subscription Cancelled A customer has cancelled a subscription
Order Processed A recurring order is processed
Charge Failed A failed to charge customer
Charge Max Tries Reached The maximum tries to charge customer is reached
Payment Method Updated A customer has updated the payment method
Customer Update A customer information updated

Event Properties

The list below outlines the properties included in the events listed above.

Property Description Property Type
userId A Shopify Customer ID (after checkout step 2) Double
email A Shopify email address (after checkout step 2) String
order_id The ID of the order String
checkoutId The ID of the checkout session String
shipping The shipping cost Float
tax The amount of tax on the order Float
total The total value of the order Float
affiliation The affiliation of the order String
coupon A discount coupon, if applicable String
currency The currency of the order String
discount The discounted amount Float
products A list of all the product at that step of the funnel Array
step The checkout step Integer
paymentMethod The payment method chosen for checkout String
shipping_method The shipping method chosen for checkout String
context['Google Analytics'].clientId The user’s Google Analytics Client ID String
context['Google Analytics'].geoid The user’s location String
context.uip The user’s IP address String
sent_from A unique property to identify events sent by Littledata String
presentment_currency The user’s local currency String
presentment_total The order total in local currency String

Product Properties

Each item in the products array may have the following properties:

Property Description Property Type
product_id The Shopify product ID String
shopify_product_id Also Shopify product ID, with device-mode events String
sku The product SKU String
variant The product variant name String
shopify_variant_id The Shopify variant ID String
category The category of the product (defaults to all) String
brand The brand of the product String
list_id The ID of the product collection String
list_name The name of the product collection String
list_position The product position in the collection Integer
name The product name String
price The product price Float
quantity The quantity of products Integer

This page was last modified: 28 Oct 2020

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account