• Home
  • Features  
  • Integrations
  • Pricing
  • Demo

Install Affilimate's tracking snippet

Please note: Affilimate is designed to work with a website that you personally own. You cannot use Affilimate as intended with Facebook pages, Google sites, LinkedIn profiles, Instagram, TikTok profiles, etc. as your primary data source. We track revenue from all sources, but only automate attribution on your website.

When you install Affilimate on your site, you'll need to add two things:

  1. A verification code in <head> of your site, used to verify ownership of the property
  2. A tracking snippet, just before the </body> of your site, used to apply tracking to your links

Here's how to install Affilimate on any blogging platform:

  1. WordPress
  2. Squarespace
  3. Wix
  4. Webflow
  5. Other blogging platforms
  6. Google Tag Manager
  7. How to reinstall the snippet if your site is already verified

Open the Setup flow by clicking the button called  Waiting for data next to your first site (or pressing Add website for additional sites):

Then choose your platform to get started.


You have a few options, depending on which themes and plugins you're using:

  1. Use the "Insert Headers and Footers" plugin (Recommended)
  2. Paste the snippet directly into your theme files (no plugin)
  3. Use Mediavine's Trellis Hooks
  4. Use the Genesis Customizer
  5. Use Google Tag Manager

You only need to pick  one method for installing your snippet.

After installation, make sure to clear all your caches. Both inside WordPress and your CDN if you have one. For example, here's how to clear your cache with NitroPack, WP Rocket, and Cloudflare. If you have a different caching plugin, try googling "[your plugin name] clear cache".

Option 1: Use the Insert Headers and Footer Scripts plugin

Here's a video and screenshot of how to use this plugin to set up. Written instructions are also below.

  1. Install the Header and Footer scripts plugin by following the installation guide.
  2. Activate the Header and Footer Scripts plugin through the Plugins menu in WordPress
  3. Go to Settings > Insert Headers and Footers
  4. Paste your Affilimate verification code in the section called Scripts in Header
  5. Paste your Affilimate snippet in the section called Scripts in Footer
  6. Finally, click Save
  7. Remember to clear any caches you have configured, whether inside your WordPress site or an outside CDN.

Option 2: Paste the snippet into your theme

  1. Open your WordPress admin and look in the sidebar for Appearance > Theme Editor
  2. Under the list called Theme Files choose the file called Theme Header (header.php)
  3. Paste your Affilimate verification code right before the tag called </head> and then click Update File
  4. Then, locate the file in the list of Theme Files called Theme Footer (footer.php)
  5. Paste your Affilimate snippet right before the tag called  </body> and then click Update File
  6. Remember to clear any caches you have configured, whether inside your WordPress site or an outside CDN.

Option 3: Use Mediavine's Trellis Hooks

Use Mediavine's Trellis theme hooks to set up Affilimate for your site:

  1. Navigate to Appearance > Mediavine Trellis > Hooks
  2. Paste your verification code in the section titled Add custom HTML code to the <head> tag.
  3. Paste your snippet in the section titled Add custom HTML code to the end of the <body> tag.
  4. Press Save in the top right corner.
  5. Remember to clear any caches you have configured, whether inside your WordPress site or an outside CDN.

Option 4: Genesis Customizer

Use the built-in customizer that comes with Genesis to insert the Affilimate snippet.

  1. Navigate to Appearance > Customize > Theme Settings
  2. Click Header/Footer Scripts
  3. Paste your verification code in the section titled Header scripts
  4. Paste your snippet in the section titled Footer scripts, and then click Publish
  5. Remember to clear any caches you have configured, whether inside your WordPress site or an outside CDN.

Option 5: Google Tag Manager

Jump down to the section on Google Tag Manager to learn how to install Affilimate with this technique.

You will still need to install the verification meta tag using one of the techniques above, but you can use GTM to install the JavaScript.


You can use Squarespace's code injection feature if you're on a Business or Commerce plan.

  1. In the Home Menu, go to Settings, then Advanced, then Code Injection
  2. In the section labeled Header, paste your verification code
  3. In the section labeled Footer, paste your snippet and then save your changes
  4. Remember to clear any caches you have configured, whether inside your Squarespace site or an outside CDN.
<script async src=""></script>


You can add Affilimate as custom code if you have a paid Webflow account or active site plan.

  1. Go to Project settings > Custom code.
  2. Paste your meta verification code in the Head Code section.
  3. Paste your tracking snippet in the Footer Code section.
  4. Press Apply Changes.
  5. Remember to clear any caches or CDN before verifying your site.


You will use Wix's Tracking Tools and Analytics feature.

  1. Open your site's dashboard and click Settings
  2. Click Tracking & Analytics under Advanced Settings in the left-side navigation
  3. On that page, click the button labeled + New Tool and then select Custom from the menu
  4. Copy your Affilimate snippet code into the box
  5. Choose your domain name and enter a name for the code (you can call it "Affilimate Snippet")
  6. Under Add Code to Pages choose Load code on each new page
  7. Under Place Code in choose Body - end
  8. Click Apply
  9. Remember to clear any caches you have configured, whether inside your Squarespace site or an outside CDN.

Other blogging platforms

If you're not using one of the mentioned plugins, try googling "custom javascript [your platform's name]".

Then, you will most likely find instructions for adding custom code to your website. You can also either ask your host for help, or email us at and we'll try and point you in the right direction!

Google Tag Manager

You will need to enter the verification code into the head of the website using one of the methods above.

For the tracking snippet, follow these steps:

  1. Go to Tags > New and choose Custom HTML Tag
  2. Then, add this code to the HTML tag: <script async src=""></script>
  3. The for Trigger Configuration, choose "All Page Views".

How to reinstall the tracking snippet

If you already installed our tracking snippet you will no longer see the 'waiting for data' button in the dashboard, but you can still view, copy and paste your tracking snippet from your account menu.

From any page inside Affilimate, click on Your account icon in the upper right hand corner. Then click on Tracking Setup.

Then you will see your unique tracking snippet and can reinstall it using any method mentioned earlier in this article.

Have questions? Contact us at anytime.

Last Updated 10/18/2022

Related articles

Try the affiliate analytics platform for content websites

Affilimate aggregates all your affiliate commissions in one place, and then adds the missing attribution data you need to maximize your affiliate revenue from every post you publish.

Create your dashboard   Get a demo

 Free 15-day trial   No credit card required

Affilimate Analytics App

Hey, I'm Monica.

I'm the co-founder of Affilimate.

Once per month, I send insider tips and strategies for affiliates in this newsletter.

It's short, practical, and original. Try it out:

No spam, unsubscribe anytime.

AffilimateBy Adaero Software