Overview
For affiliate tracking you add two small scripts to your Shopify theme and create four webhooks in your Shopify admin. No app needs to be installed.This guide only sets up the technical side in your shop. Whether clicks and orders are actually recorded also depends on your affiliate agreement, see Affiliate tracking.
Requirements
- An active affiliate agreement with a partner ID, see Partner agreement. The webhook URLs are shown only once your partner ID has been assigned.
- Access to your shop’s theme code (Online Store → Themes → Edit code).
- Admin access to Settings → Notifications in Shopify to create webhooks.
Setup
1
Open the integration
In the dashboard go to Affiliate → Integration, select your online shop at the top right and open the Manual script tab.
2
Add the cookie script to the head
Copy the Cookie script via Copy script. In Shopify open Online Store → Themes → … → Edit code and paste the script into
layout/theme.liquid directly before </head>. The script already includes the <script> tags.3
Add the core script before the end of the body
Copy the Core script and paste it into the same file directly before
</body>. Save the theme.4
Store the webhook secret
In Shopify open Settings → Notifications → Webhooks. At the bottom you find the signing key Shopify uses to sign webhooks. Copy it, enter it in the dashboard under Shopify Webhook Secret and click Save secret.
5
Create the webhooks in Shopify
In the dashboard you find four URLs under Shopify Webhooks. In Shopify, under Settings → Notifications → Webhooks, create one webhook per URL (format JSON):
For the webhook API version, choose the latest stable version Shopify offers (for example
2025-10 or newer). Highcovery only reads the standard order fields, which are included in all current versions.6
Add coupon codes (optional)
Under Coupon codes you can enter codes separated by commas. If a customer uses one of these codes, the order is attributed to you even when no click ID is available.
7
Check the setup
Open a deeplink from the Highcovery app and place a test order with it. It appears on your affiliate page under Recent activity.
How tracking works
- A user clicks your product in the Highcovery app and lands in your shop with the URL parameters
hc_cid(click ID) andhc_pid(partner ID). - The cookie script stores both values as cookies for 30 days. It respects the Shopify Customer Privacy API: without marketing consent no cookie is set.
- The core script writes the click ID into the cart as a cart attribute. That is how it ends up on the order.
- The webhooks report every order to Highcovery. Highcovery reads the click ID from the order and creates the conversion. If it is missing, the coupon code fallback applies.
- Cancellations and refunds are reported as well and adjust the commission.
Troubleshooting
- No conversions despite orders – check that both scripts are in the active theme and that the four webhooks in Shopify point to the correct URLs.
- Webhooks are rejected – the webhook secret in the dashboard must match the signing key from Shopify exactly. Save it again.
- Orders with a coupon are not attributed – the code must be entered under Coupon codes exactly as it is named in Shopify.
- Tracking status inactive – check the status banners on your affiliate page. They name the reason, for example a missing payment method.