Skip to main content

How to Set Up GoAffPro Affiliate Tracking (via Google Tag Manager)

A guide specifically explaining how to connect GoAffPro to SupaPass using Google Tag Manager

Updated this week

This guide explains how to connect GoAffPro to your SupaPass site using Google Tag Manager (GTM) so affiliate referrals and conversions are tracked correctly.

Before You Start

To be able to get GoAffPro, there a few things you need before you can start the setup:

  • A GoAffPro account with your shop configured

  • Your GoAffPro Shop ID (found in GoAffPro → Settings → General, or inside the loader.js URL)

  • Access to your Google Tag Manager container

  • Google Tag Manager connected in SupaPass
    Go to: Dashboard → Community → Tracking → Google Tag Manager

Once all this in place, you can continue with the steps to set up your affiliate tracking with GoAffPro.

Step 1 Get Your Shop ID

  1. Log in to GoAffPro

  2. Go to Settings → Integrations → Google Tag Manager

  3. Locate the loader.js script

  4. Copy your Shop ID from the URL:

https://api.goaffpro.com/loader.js?shop=YOUR_SHOP_ID

edit the URL above to replace YOUR_SHOP_ID with your actual ID.

You will use this inside GTM.

Step 2: Create Data Layer Variables in GTM

These variables allow GTM to read purchase data after checkout.

Create Transaction ID Variable

  1. Go to Variables → User-Defined Variables → New

  2. Select Data Layer Variable

  3. Data Layer Variable Name:
    ecommerce.transaction_id

  4. Data Layer Version: Version 2

  5. Name it:
    DLV - transaction_id

  6. Save

Create Order Value Variable

  1. Go to Variables → User-Defined Variables → New

  2. Select Data Layer Variable

  3. Data Layer Variable Name:
    ecommerce.value

  4. Data Layer Version: Version 2

  5. Name it:
    DLV - value

  6. Save

Step 3: Create a Purchase Trigger

  1. Go to Triggers → New

  2. Choose Custom Event

  3. Event name:
    purchase

  4. Name it:
    CE - purchase

  5. Save

This trigger fires after a successful checkout.

Step 4: Add the GoAffPro Loader Tag

This loads the affiliate script on every page and captures referral codes.

  1. Go to Tags → New

  2. Choose Custom HTML

  3. Paste the following code (replace YOUR_SHOP_ID with you actual ID):

<script src="https://api.goaffpro.com/loader.js?shop=YOUR_SHOP_ID"></script>
  1. Under Triggering, select All Pages

  2. Open Advanced Settings

  3. Set Tag firing priority to 100

  4. Name it: GoAffPro Loader

  5. Save

Step 5: Create the Conversion Tracking Tag

  1. Go to Tags → New

  2. Choose tag type: Goaffpro Affiliate Marketing

If you do not see this option, import the template via:
https://app.goaffpro.com/wizard
Select Google Tag Manager as your platform.

  1. In Website API Token, enter your Shop ID

  2. In Order ID, select {{DLV - transaction_id}}

  3. In Order Total, select {{DLV - value}}

  4. Under Triggering, choose CE - purchase

  5. Name the tag: GoAffPro Conversion Tracking

  6. Save

Step 6: Publish Your Changes

GTM changes only go live after publishing.

  1. Click Submit in GTM

  2. Add a version name

  3. Click Publish

How to Test

Test Affiliate Link

  1. Create a test affiliate in GoAffPro

  2. Open their referral link (example: yoursite.com?ref=TESTAFFILIATE)

  3. Open Developer Tools → Application → Local Storage

  4. Look for entries starting with gfp_

If present, referral tracking is active.

Test a Purchase

  1. Visit your site via the affiliate link

  2. Complete a test purchase

  3. On the success page, open the console and run:

window.dataLayer.filter(e => e.event === 'purchase')

You should see transaction_id, value, currency, and items.

Then confirm the conversion appears in your GoAffPro Sales Log.

If you need help, reach out via chat in your SupaPass Dashboard.

Did this answer your question?