Overview
AffiliatePro has two separate fields for Google Analytics tracking code depending on which part of the platform you want to track:
| Field | Tracks | Where to find it |
|---|---|---|
| Google Analytics For Site Page | Affiliate panel, admin panel, and front-end site pages | Settings → General Settings → Site Settings tab |
| Google Analytics For Store Page | Store pages only | Marketing → Store → Settings → Contact & Analytics tab → Analytics & Custom Scripts section |
To track your entire platform, paste your code into both fields.
Step 1 — Get your tracking code from Google
- Go to Google Analytics and open your property.
- Go to Admin → Data Streams, then click on your web stream.
- Click View tag instructions → Install manually.
- Copy the full
<script>block provided by Google. It looks like this:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Step 2 — Add tracking to the affiliate panel and front-end site
- In the top navigation bar, click Settings.
- From the dropdown, click General Settings.
- The Site Settings tab opens by default.
- Scroll down to the Google Analytics For Site Page section.
- Paste the full
<script>code block into the textarea. - Click Save Settings.
This field also has a Global Script field above it where you can inject any custom script and select which sides it appears on: Admin, Affiliate, Front, or Store. You can use this as an alternative if you want full control over where the code loads.
Step 3 — Add tracking to the store pages
- In the top navigation bar, click Marketing.
- From the dropdown, click Store.
- Click Settings in the Store nav bar or the Settings card in the Store Management Hub.
- Click the Contact & Analytics tab.
- In the Analytics & Custom Scripts section, find the Google Analytics For Store Page field.
- Paste only the JavaScript — no
<script>tags. Example:
gtag("config", "G-XXXXXXXXXX");
The store analytics field expects JavaScript only — do not include the
<script> opening and closing tags. The platform wraps the code automatically.- Click Save.
Verify tracking is working
After saving, open your site in a browser and use the Google Tag Assistant browser extension, or check Google Analytics → Reports → Realtime to confirm events are being received.