Property and destination updates in our Shopify source for Segment

connect segment and shopify littledata shopify app

Over the last 6 months, we’ve continued to enhance Littledata’s Shopify source for Segment to work with any modern data stack. We have focused on providing a more comprehensive range of events and properties to sync with any destination in Segment, including email marketing tools, data warehouses, and Segment Personas.

Our Segment connection uses a combination of client-side (browser) and server-side tracking to ensure 100% of your Shopify store data is sent to Segment. Littledata automatically integrates with Shopify and Shopify Plus sites to enable complete ecommerce analytics, including sales, marketing, customer, and product performance data.

Recent updates include better matching with Personas, more consistent product properties, and more. Here are some highlights.

Tracking plan for Segment Protocols

We’ve written a full tracking plan and event schema, which is ready to upload into Protocols to prepare for robust data consistency in your data warehouse.

Better matching with Segment Personas

You can now choose which userId to use for Segment events from a standard list of common identifiers:

  • Shopify customer ID – This is the default for new installs. Recommended if you have a simple Shopify setup with minimal integrations.
  • Hashed email – The MD5 email hash is useful if you have other marketing platforms sending traffic where you know the email of the visitor (e.g. email marketing like Bronto or Marketo), but not their Shopify customer ID.
  • Email – The email identifier is recommended when other platforms use the email and can’t hash it, and you are comfortable with the privacy implications.
  • None (no identifier) – Choose “none” if user identity is already handled by your Segment implementation and you only need the extra events powered by Littledata’s Shopify source.

All user traits below are now being sent in the context.traits, and are synced with your CRM destinations every time the customer record in Shopify is updated.

TraitDescriptionType
createdAtThe date customer record was createdDate
customerLifetimeValueThe total spend of customer on the Shopify storeDouble
default_address.streetThe customer’s default street addressString
default_address.cityThe customer’s city addressString
default_address.postalCodeThe customer’s ZIP / post codeString
default_address.stateThe customer’s state addressString
default_adress.countryThe customer’s countryString
descriptionThe customer notesString
emailThe customer’s email addressString
firstNameThe customer’s first nameString
lastNameThe customer’s last nameString
marketingOptIn The marketing_opt_in field from Shopify customerString
phoneThe customer’s phone numberString
purchaseCountThe number of orders by this customerInteger
state Whether the customer account is enabled (user has opted in) or disabledString
tags The custom tags applied to the customerString
userIdChosen user identifier, defaulting to Shopify Customer IDDouble
verified_emailWhether the customer has verified their emailBoolean

Import historic Shopify orders into Segment

For Enterprise Plus customers we can now import orders and refunds from before the date Littledata was connected to Segment. This allows you to build a complete customer record in destinations that support historic events, such as a data warehouse.

If you are already a Littledata Plus customer, please contact your account manager to discuss setting up an order import. If you haven't yet tried Littledata or are still investigating solutions for you data stack, book a demo today with one of our data experts.

Try Littledata free for 30 days

Consistent product properties across all events

We understand you need a consistent set of product properties with every ecommerce event to make analysis easier. For example, the product image URL is available within a Product Added event to make it easy to set up dynamic product retargeting campaigns.

Previously, we only got the following properties from Shopify’s webhooks:

  • shopify_product_id
  • shopify_variant_id
  • name (title)
  • brand (vendor)
  • sku

And now we add these extra product properties for all events:

  • variant (variants.title)
  • image_url (from images.[0].src)
  • cart_id (only with Product Added / Product Removed)
  • url
  • compare_at_price (variants.compare_at_price)

Extra revenue properties

We’ve added more reporting flexibility with how we send revenue data to Segment. Specifically, on Order Completed and all Checkout events, you will now see a subtotal = (product revenue including discounts).

For the Order Completed event only, your store can opt in to an additional revenue property (product revenue excluding discounts, shipping and tax) via the Littledata application. Revenue is a reserved property in many Segment destinations. Opting in will override the total property sent to Google Analytics.

Supporting the Iterable email destination

Iterable is a cross-channel marketing platform that powers unified customer experiences and empowers you to create, optimize and measure every interaction across the entire customer journey.

With this update, when an Iterable campaign leads to an Order Completed event the event properties will contain campaignId and templateId. To get these extra properties, you will need to edit the LittledataLayer setup to track the iterableEmailCampaignId and iterableTemplateId cookies.

In addition we send an email field with all events linked to a user, so Iterable and other email marketing destinations can use the events.

Supporting the Google Analytics destination in Cloud Mode

In Cloud Mode, Segment will send event data to Segment’s cloud servers, and from there, we will translate and route that data to Google Analytics. This reduces the amount of third-party code on your site and you will be able to replay historical data in Google Analytics.

We are happy to announce that you can now switch Google Analytics connection mode to Cloud Mode to relay events to GA from Segment's servers. This will increase page performance and provide greater control of the schema.

More Subscription Event Properties

On Subscription Created, Subscription Updated and Subscription Cancelled events we have added:

  • status
  • product_id = shopify_product_id
  • name = product_title
  • price
  • quantity
  • sku
  • shopify_variant_id
  • variant = variant_title
  • order_interval_frequency
  • order_interval_unit

On the Subscription Cancelled event only we have:

  • cancellation_reason
  • cancellation_reason_comments

And on the Charge Failed event we added: 

  • error_type

Change of product ID used in Segment events

Previously, we used the product SKU for client-side events to be consistent with the GA destination. From this month, we have changed this to send the Shopify product ID as the product_id field in Segment for all events.

Ability to send anonymized IP instead of full IP to Segment

Segment’s AnalyticsJS library sends the whole IP address by default in Track and Page events. This is contrary to our GDPR recommendations, and we now set context.ip with the last octet (3 digits) anonymized. This still allows geolocation of the events, but ensures IP addresses are not accidentally captured in end locations.

Prev
Optimizing Littledata’s Shopify tracking script for speed and accuracy
google analytics app featured in shopify app store

Optimizing Littledata’s Shopify tracking script for speed and accuracy

At Littledata we know that page load speeds are essential for ecommerce success,

Next
Top 7 rule-based audiences for ecommerce marketing
shopify integrations

Top 7 rule-based audiences for ecommerce marketing

Rule-based audiences are customer groups or segments derived by customer

You May Also Like