Setting up Affiliate Tracking for Any Website
  • 13 Sep 2024
  • Dark
    Light
  • PDF

Setting up Affiliate Tracking for Any Website

  • 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 track where your most successful conversions are.

Different ecommerce stores and websites have different steps for affiliate tracking. If you want to set up affiliate tracking with an ecommerce store instead, check out our other articles on setting up affiliate tracking with Shopify or WooCommerce.

What You'll Need

  • Access to your website’s HTML. If you use Google Tag Manager, you can also include our script through it to be included on every page.
NOTE
We highly recommend someone on your team with experience in HTML completes this setup. This setup requires scripts to be pasted into specific sections of your website’s HTML to work correctly. If you have any questions, please contact GRIN support.

How to Do It

You can set up affiliate tracking with any website via the App Marketplace or your Integrations Settings.
To set up affiliate tracking from the App Marketplace:

  1. Navigate to Account > App Marketplace. This will open the App Marketplace page.
  2. Find the Affiliate Integration by either:
    1. Searching “Affiliate Integration” in the search bar.
      4416807526935mceclip2.png
    2. Navigating to the Recommended Apps App Category.
      4416822441367mceclip0.png
  3. Click Generate Token on the Affiliate Integration app card. This will redirect you to the Affiliate Integration’s settings in your Integrations Settings.

To set up affiliate tracking from your Integrations Settings:

  1. Navigate to Account > Account Settings > Integrations. This will open a list of your current integrations.
  2. Click on Affiliate Integration. This will open the Affiliate Integration’s settings.

From here, the steps to set up affiliate tracking for your website are the same:

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

    This will generate:

    • Your token and the date it was generated.
    • A copy button.
    • A delete button.
  1. Click Step 2: Install the Affiliate SDK.
  2. Click the Copy Install Code button under the Any Website section to copy the script onto your clipboard.

    4416822565655affiliate-integration-copy-install-code-website.png

You can also copy the code from below:

< script  > ( function  (  )   {Grin =  window  .Grin || ( window  .Grin = []); var  s =  document  .createElement( 'script'  );s.type =  'text/javascript'  ;s.async =  true  ;s.src =  '  [https://d38xvr37kwwhcm.cloudfront.net/js/grin-sdk.js'  ; var   ](https://d38xvr37kwwhcm.cloudfront.net/js/grin-sdk.js';var) x =  document  .getElementsByTagName( 'script'  )[ 0  ];x.parentNode.insertBefore(s, x);})();  </ script  >  
  1. Navigate to your website’s HTML.
  2. Paste the code you copied in step 3 into the header or before the closing body on every page of your website.
  3. Go back to your Affiliate Integration Settings in GRIN.
  4. Click Step 3: Enable Conversion Tracking.
  5. Click the Copy Success Code button under the Any Website section to copy the script onto your clipboard.
    4416814201751affiliate-integration-copy-success-code-website.png

You can also copy the code from below:

< script  > 

// set the amount here  

var amount = '100.50';  

// set an order number if it exists  

var order_number = '';  

// send the conversion to Grin  

Grin = window.Grin || (window.Grin = []);Grin.push(['conversion', amount, {order_number: order_number}]);  

</ script  > 
  1. Paste the script into a text editor and update the amount (the subtotal after discounts and before tax and shipping costs) and order_number values to use the variables used by your website. Your site’s developer will likely be the best resource to help you determine what your variables are.
  2. Copy your script with the updated values.
  3. Navigate to your website’s order success page.
  4. Paste the script you copied in step 10 into your order success page.
NOTE
You may need to contact your Ecommerce admin for assistance with this step. Please contact GRIN support if you need any additional assistance.
That’s it! Your website is now set up for affiliate tracking in GRIN. Check out our other articles on creating affiliate link groups and assigning them to your creators to start seeing your creators’ conversions.

Was this article helpful?