Shopify
Shopify integration is a 2-step process:
1. Adding the CartStack tracking code to your Shopify theme.
2 Adding Webhooks to your Shopify site.
Adding Our Tracking Code
1a. Adding our code onto your Shopify account. Our code can be found on the Code Page of your CartStack account.

1b. Log into your Shopify account. Select Online Store > Themes. Select "Edit HTML/CSS" from the drop-down menu.

1c. Under Layouts > Theme.Liquid. Paste tacking code right above the </head> tag.

Adding Webhooks
2a. Select Settings > Notifications from the admin pane. Scroll to find Webhooks.

2b. Create Webhooks for 5 events. You will need your unique siteID from your CartStack account.
2c. Locate your unique CartStack SiteId from the Code Page on your CartStack account. Your unique siteID will go at the end of the webhook URLs below.

2d. Select the Webhook from the "Event" dropdown and update each URL, adding your SiteID to the end of each URL.
Note: make sure to copy the webhook URL that is next to each event below. The URLs are slightly different based on event type, and any spaces should be removed.
| Event | Webhook URL |
|---|---|
| Order Creation | https://api.cartstack.com/wh/order/?platform=shopify&siteid=XXXXXXXX |
| Cart Creation | https://api.cartstack.com/wh/cart/?platform=shopify&siteid=XXXXXXXX |
| Cart Update | https://api.cartstack.com/wh/cart/?platform=shopify&siteid=XXXXXXXX |
| Checkout Creation | https://api.cartstack.com/wh/checkout/?platform=shopify&siteid=XXXXXXXX |
| Checkout Update | https://api.cartstack.com/wh/checkout/?platform=shopify&siteid=XXXXXXXX |

2e. Once all 5 webhooks are updated, please copy/paste the webhook verification code to support@cartstack.com, and someone on the CartStack team will test your integration and let you know when your email campaign is ready to go live!
