Setting up Affiliate Tracking (Shopify)

Use the following guide in order to set up affiliate tracking for Shopify. Affiliate Tracking allows you to review page visits and sales from your influencers using affiliate links.

In this guide, you will learn how to:


You must connect your Shopify store to GRIN, within Brands, and you must have admin access to your Shopify account in order to complete the affiliate tracking set-up.


Generate an Affiliate Token 

Step 1 Go into your  Account Settings.

Step 2 Click on the Affiliate Integration section and click Generate Token.


Step 3 Your Token will be displayed, along with the date created and an option to delete the token.



Enable Conversion Tracking

Step 1 Go into your  Account Settings and click on the Affiliate Integration section.

Step 2 Under Tracking Conversions, click </> Copy Shopify Code to copy the conversion tracking code.


Step 3 In a new browser tab, login to your Shopify account.

Step 4 In Shopify, click Settings, on the bottom left-hand side, and select Checkout.


Step 5 Scroll down to the Order Processing section. Within the Additional Scripts box, enter the copied Shopify Code, from the previous step, after any pre-existing text.


If there are any existing scripts in the "Additional Script" box, then paste the tracking conversion script at the end of the existing scripts and on its own line. Not doing so can lead to incorrect installation of the tracking script and cause sales to be lost.



The GRIN SDK has been added to your Shopify store in the “Apps” section. No further action is needed to enable conversion tracking.


Create an Affiliate Link Group

Step 1 Click on Brands and click the Affiliate Links icon.


Step 2 Click on the + New Link button.

Step 3 In "Step 1. Link Details", enter the Attribution Window.


The Attribution Window is the number of days after clicking an affiliate link that sales will be attributed to that link.


Step 4 In "Step 2. URL Details", enter a Domain, Destination URL and Influencer Link Pattern.


The Destination URL is the web page that your potential customers reach when they click one of your affiliate links.

The Influencer Link Pattern is the visible structure of all affiliate links, within this group. Once the links are assigned, variables, such as, "[first_name]" will automatically be replaced by the influencer's first name.

Destination URL Parameters, also referred to as UTM parameters, are simply tags you add to a URL. When your link is clicked, the tags are sent back to Google Analytics and tracked. Adding UTM parameters is optional. Learn how to set up a UTM parameter.


Step 5 In "Step 3. Date Restrictions", enter a Start and End Date for when the links will be active (Optional).


Step 6 In "Step 4. Payout Defaults", enter a Payout Type and Payout Value. 



The payout defaults are fall back rates when specific influencer rates have not been set. This is the commission rate that influencers will be paid for sales that are attributed to them. Once a link has been created, you can adjust rates at an individual influencer level.

 Step 7 Click Save.


Setting an Attribution or Sale Window

An attribution window for an affiliate link is a set number of days that a sale will count towards the influencer after their affiliate link has been used. For instance, setting a 30-day window would allow a customer to use an influencer's link, leave the site, then later return to make a purchase which would then count as the influencer's sale. However, the sale will only count as long as the sale occurs within the 30-day attribution window.

Follow the steps below to learn how to set an attribution window.

Step 1 Click on Brands and click the Affiliate Links icon.


Step 2 If you are creating a new affiliate link groupclick on the + New Link button. To edit an existing link group, click on the pencil icon.


Step 3 In "Step 1. Link Details", enter the Attribution Window.



Assign Affiliate Link Groups to Campaigns

In a campaign, affiliate links can be used to track sales by influencers, enable influencers to earn commission on sales or both. Also, you need an active campaign to assign affiliate link groups. Set-up a campaign prior to starting this step.


Revenue Tracking ONLY (No Commission)

Step 1 Click on Program and select Campaigns.

Step 2 Click on the Edit Campaign Details icon.


Step 3 In "Step 7. Tracking", select your Affiliate Link Group.


Step 4 Click Save.


Revenue Tracking + Commission Payouts

Step 1 Click on Program and select Campaigns.

Step 2 Click on the Edit Campaign Details icon.


Step 3 In "Step 4. Compensation", select the Commission box and select an Affiliate Link Group.


Step 4 Click Save.


Assign Affiliate Links to Influencers

Assign Affiliate Links in Bulk

Step 1 Click on Program and select Campaigns.

Step 2 Click on the Campaign Work Room icon.


Step 3 Click on the Links section and select the checkbox for each influencer you are assigning an affiliate link to.

Step 4 Click on Assign Affiliate Link.


Step 5 Click Save.


Assign Affiliate Links Individually 

Step 1 Click on Program and select Campaigns.

Step 2 Click on the Campaign Work Room icon.


Step 3 Click on the Links section, hover over the influencer row, and click the Assign Affiliate Link.


Step 4 Click on the Assign Links button and the assigned link will appear in the influencer's Link column.


Step 5 Click Save.





Article is closed for comments.