website logo
Navigate through spaces
⌘K
OVERVIEW
ORDER MANAGEMENT (OMS)
SHIPPING - SETUP
Shipping Methods
Shipping Zones
Shipping Method Setup Examples
TAXES - Setup
Tax Automation with Stripe Tax
Tax Automation with Avalara
CONTENT MANAGEMENT (CMS)
DATA
CUSTOMER LIFETIME REVENUE
Customer Lifetime Revenue Explanation
Customer Lifetime Revenue and Purchase Likelihood
Recency Frequency and Monetary
CLR and RFM Data Table Glossary
RFM and CLR in the Hub
LOOKER
Modifying a Dashboard
Timestamp differences between Looker, OMS and Shopify
How to create custom calculations in Looker
Looker and Shopify data models
Custom fields
How to 'Save and Schedule' reports
Creating Custom Reports or Look
Looks vs Dashboards
Login Looker FAQ
Looker Glossary
SEGMENT EVENT TRACKING
What are event tracking
Adding Tracking
What is the Tracking Plan?
The Chord Tracking Plan
The Shopify Tracking Plan
Event Tracking FAQ
EVENT UPDATES PAGE
Email Subscription Payment Event Update
Product Feed Setup
Getting Segment to Production
Consent Management
Installing in Next.js
Installing in Gatsby
Integrations
👩‍💻Developer Tools
Using Chord with Shopify
Docs powered by archbee 

SDK Reference

2min

The Chord client-side Javascript SDK is installed as a Gatsby theme. It's available as an npm package, @chordcommerce/gatsby-theme-performance, via GitHub Packages.

Despite the name, this package does not provide a visual theme. To quote from the Gatsby documentation:

Gatsby themes are plugins that include a gatsby-config.js file and add pre-configured functionality, data sourcing, and/or UI code to Gatsby sites. You can think of Gatsby themes as separate Gatsby sites that can be put together and allow you to split up a larger Gatsby project!

The gatsby-theme-performance theme includes the Chord SDK, a set of methods you can import and use in your React components to do things like add items to a cart and check out. The theme also pre-configures your Gatsby site with a number of useful commerce features like product feeds and internationalization support.

The Chord SDK is available to use in your React components via React hooks:

Hook

Description

useAnalytics

Provides support for sending UI-related tracking events to Segment.

useAuth

Provides support for user authentication with a Shopify customer account.

useCart

Returns the current shopping cart, and functions for creating and interacting with the shopping cart.

useUser

Returns the current user, and functions for loading data about the user.



Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Gatsby Starter
NEXT
useAnalytics
Docs powered by archbee