Skip to main content

[Other Platforms] Email and API integrations: Adding the referral tracking code

Where to find your referral tracking code and how to add it to your purchase completed page for email and API integrations

Written by Adam

This article applies if your store connects to ReferralCandy through the Email Integration or API Integration connection type. If your store connects using JavaScript Integration, its tracking code steps are covered in JavaScript integration instead.

If you connect your store using email integration or API integration, adding the referral tracking code is one of the two necessary steps.

Note: If your eCommerce platform doesn't allow adding a JavaScript tag to your store pages, you can use an image tag instead — see the section at the end of this article.

The referral tracking code helps ReferralCandy detect successful referrals from your store. It goes on the page customers are taken to after they complete payment for their order — the purchase completed page, sometimes called the "Thank you" page.


Insert the referral tracking code

  1. On the ReferralCandy dashboard, go to Integrations > Standalone.

  2. Click Next to show the Add ReferralCandy to your online store section, then Copy the code snippet. The tracking code is unique to your account, so always copy it from your own dashboard.

  3. Go to your store's admin panel and paste the code into your theme's "Thank you" or purchase completed page, just before the closing </body> tag.

  4. Save and publish your theme or page.


Check that the tracking code is working

To confirm the referral tracking code is working, make a test purchase in your store, then go back to Integrations > Standalone and check Last detected URL, shown just below the tracking code. Once ReferralCandy detects the tracking code, Last detected URL shows the page where the code was last seen — after a test purchase, it should show your purchase completed page's URL.

Still showing a dash (–)? ReferralCandy hasn't detected the tracking code yet. Double-check that the code sits just before the closing </body> tag of your purchase completed page and that the page is saved and published, then make another test purchase. If Last detected URL still doesn't update, our support team can take a look — just let us know.

Can't add a JavaScript tag? Use an image tag instead

If your store platform doesn't let you add a JavaScript tag to your purchase completed page, insert an image tracking pixel instead. The image tag does the same job as the JavaScript tracking code — it records visits to your purchase completed page so ReferralCandy can detect which purchases came from referrals — and it works for both the Email and API integrations.

  1. Find your unique tracking ID: in the code snippet on the Integrations > Standalone page, the tracking ID is on the third line, between /purchase/ and .js";.

  2. Create your image tag by replacing [Tracking_ID] in this code: <img src="https://go.referralcandy.com/purchase/[Tracking_ID].jpg" /> — for example: <img src="https://go.referralcandy.com/purchase/kc61i85wyeplg.jpg" />

  3. Insert the image tag anywhere within the body of your purchase completed page, then save and publish the page.

  4. Confirm it's working the same way as the regular tracking code: make a test purchase and check Last detected URL on the Standalone page.

Did this answer your question?