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

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

Before you set up GoAffPro, make sure you have the following:

  • 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: Community → Integrations → Tracking, add your ID in the Google Tag Manager Token field and click Save

Once all this is 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

Your Shop ID is the value after shop= in this URL.

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 your 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.

Frequently Asked Questions

Got a question? Find quick answers below, or start a chat 💬

Does this track purchases made in my iOS or Android app?

No. Google Tag Manager works on your website only, so affiliate conversions are tracked for purchases made through your website checkout.

Where do I add my Google Tag Manager ID in SupaPass?

Go to Community > Integrations > Tracking, paste your ID (it starts with GTM-) in the Google Tag Manager Token field and click Save.

I set everything up but no conversions show in GoAffPro. What should I check?

Make sure you clicked Submit and Publish in Google Tag Manager, because changes only go live after publishing. Also check that the CE - purchase trigger is a Custom Event and that your loader tag uses the correct Shop ID.

How do I know affiliate referrals are being captured?

Open a test affiliate's referral link, then check your browser's developer tools under Application > Local Storage for entries starting with gfp_.

Will a purchase be counted twice if the success page is reloaded?

No. Each checkout is only tracked once.

Did this answer your question?