website logo
Navigate through spaces
Chord Commerce
⌘K
Getting Started
CMS
Data
OMS
Integrations
👩‍💻Developer Tools
Shopify
Docs powered by archbee 

Event Tracking

Chord uses Segment for event tracking. Segment is a customer data platform (CDP). Segment collects event data from a variety of sources, and cleans and unifies the data to build a complete picture of customer activity. Chord integrates with Segment's best-in-class data tracking and uses it to create accurate and relevant data insights.

Chord automatically sends customer events to Segment's tracking API from both your website front end and the Chord OMS. These events flow through Segment to a Chord data warehouse, where the data is modeled and turned into actionable insights.

Segment structures data flow as "sources" and "destinations." Sources are anything that sends events to Segment, like a website or an app. Destinations are tools or apps that will receive the data flowing from a source. Chord automatically creates a couple of sources and destinations within Segment, but you can also add your own sources and destinations. Destinations are an easy way to enable third-party integrations, like advertising and marketing tools. Read more about this concept in Segment's documentation.

How does Chord use Segment?

Chord provisions two sources in your Segment account: the Chord OMS (called the "back-end source") and your website (the "front-end source"). You will have a set of sources per environment. For example, if you have a staging environment and a production environment, you'll see four sources:

  1. "My Company Back-End (Production)"
  2. "My Company Front-End (Production)"
  3. "My Company Back-End (Staging)"
  4. "My Company Front-End (Staging)"

Back-end source

The Chord OMS sends events to the back-end source immediately, using the SEGMENT_WRITE_KEY environment variable in your OMS store settings. Verify events are being tracked by selecting the source within Segment, and then selecting the Debugger tab. You'll see a live feed of events coming from the source.

The back-end source sends events related to orders and customer accounts, like "Order Completed" and "Subscription Payment Failed." We recommend relying on events from the back-end source whenever possible when you're setting up third-party integrations, because front-end events can be impacted by ad blockers or other factors.

The Chord tracking plan reference includes a list of the events sent by the back-end source.

If you're using Chord with Shopify, you'll see one or more "Shopify Webhook" sources instead of the Chord OMS back-end source. These work similarly. Shopify sends mission-critical events like "Order Completed" to Segment via these sources. The The Shopify tracking plan reference includes a list of events sent by webhook sources.

Front-end source

The Chord JavaScript SDK sends events to the front-end source from your website. In order to set this up, you'll need to load Segment's Analytics.js library on your website and do some configuration. Find a detailed walk-through here.

Once your website is configured, the Chord SDK automatically sends events to Segment related to customer activity, like "Product Added" and "Promo Code Applied." The Chord SDK also offers functions you can use to instrument your website to track UI-related events, like "Product Clicked." Chord's website starter kits are fully instrumented with UI tracking, so you can use them to get started easily, or as examples. Read more about instrumenting your website here.

The Chord tracking plan reference includes a complete list of the events sent by the front-end source.

Data warehouse destination

Chord also provisions a data warehouse destination in your Segment account. It's connected to front-end and back-end sources. This gives the Chord data pipeline access to all events coming into Segment from Chord sources.

How should you use Segment?

Chord uses tracking data from Segment to provide actionable insights for your business. You can also use Segment directly to integrate your website with other apps and services. Add additional sources and destinations when you need them. Segment has a large catalog of integrations that are available as sources and destinations. Chord's events follow Segment's ecommerce spec, which is understood by many destinations, so they can be enabled with minimal configuration.

Updated 16 Dec 2022
Did this page help you?
Yes
No
UP NEXT
Adding Tracking
Docs powered by archbee 
TABLE OF CONTENTS
How does Chord use Segment?
Back-end source
Front-end source
Data warehouse destination
How should you use Segment?