Setting Up Affiliate Tracking with Shopify
  • 13 Sep 2024
  • Dark
    Light
  • PDF

Setting Up Affiliate Tracking with Shopify

  • Dark
    Light
  • PDF

Article summary

You can assign affiliate links to your creators and track how those links are used with affiliate tracking. With affiliate tracking, you can see how many page views, sales, and commissions your creator’s unique link has generated. This lets you not only easily pay out your creators, but also track where your most successful conversions are. 

Different Ecommerce stores and websites have different steps for affiliate tracking. If you’re not integrated with Shopify or want to set up affiliate tracking on a website instead, check out our other articles on setting up affiliate tracking with WooCommerce or any website.

What You'll Need

  • Admin access to your Shopify account

How to Do It

  1. Navigate to Account > Settings. This will open your Settings page.
  2. Select the Integrations setting. This will open a page with your current integrations. 
  3. Select Settings on the Affiliate Integration.

  1. If you haven’t generated a token yet, select Generate Token in Step 1: Generate a Token (if you’ve generated one before, you should see the token here instead). 

  1. This will generate: 
    • Your token and the date it was generated.
    • A copy button.
    • A delete button.
  2. Skip Step 2: Install the Affiliate SDK. Connecting your Shopify store to your Brand automatically installs the SDK, so no action is needed here. 
  3. Select Step 3: Enable Conversion Tracking.
  4. Select the Copy the Shopify Code button under the Shopify section to copy the script onto your clipboard. 

  1. Alternatively, you can copy the code from below: 
<script>
    Grin = window.Grin || (window.Grin = []);
    var order_number = '{{ order_number }}',
        order_name = '{{ name }}',
        amount = '{{ subtotal_price | money_without_currency }}',
        currency = '{{ currency }}';

    Grin.push(['conversion', amount, {
        order_number: order_number,
        name: order_name,
        currency: currency
    }]);
</script>
  1. Log in to Shopify.
  2. Navigate to Settings > Checkout and navigate to the Order status page section.
  3. Paste the copied Shopify code from Step 7 into the Additional scripts box. If there’s existing scripts in the box already, paste the code in a new line after the existing scripts.


Your Shopify account is now set up for affiliate tracking in GRIN!

Shopify Privacy Policy

If your Brand's Shopify store has the below setting enabled for Customer privacy, any shopper visiting your store will have a banner displayed to accept cookies.


If they are visiting from an affiliate link generated from GRIN, these cookies are required to track conversions. If a shopper rejects or ignores this banner, no sales will be tracked in GRIN.


You can visit your brand's Shopify store Privacy Policy by visiting Shopify's Privacy Page.


Was this article helpful?