AnyTrack docs
🔗 Website🖐 Feature Requests⚙ Integrations👉 Sign up
  • Getting Started
  • Archive
  • docs
    • Advanced Settings
    • Elementor
    • Integrations
    • Taboola Integration
    • AnyTrack Guide to Conversion Tracking
    • The AnyTrack Tracking Code
    • Account Setup Tutorial
    • ⚒️Pixel & Analytics Integrations
    • Getting Started with AnyTrack
    • AnyTrack Core Features & Concepts
    • Conversion logic
    • AutoTrack
    • AutoTag copy from readme
    • AutoTag from Gitbook
    • AnyTrack Initial Setup
    • Google Tag Manager
    • Google Analytics integration
    • Enhance ROI: Facebook Postback URL for Affiliates
    • Facebook Conversion API and iOS 14 tracking restrictions
    • Affiliate Link Tracking
    • Form Submission Tracking
    • Form Tracking / Optins
    • Analytics & Reporting
    • Webhooks
    • Trigger Events Programmatically
    • Custom Events Names
    • Trigger Postbacks Programmatically
    • Redirectless tracking
    • Cross-Domain Tracking
    • Event Browser & Debugger
    • Fire Third-Party Pixels
    • Multi-currency
    • Frequently Asked Questions
    • Affiliate Networks Integrations
    • Partnerize integration
    • Affiliate Networks link attributes "cheat sheet"
    • Postback URL Parameters
    • ClickBank Instant Notification Services
    • Tune integration (AKA Hasoffers)
    • LeadsHook Integration
    • Frequently Asked Questions
    • Shopify Integration
    • Custom Affiliate Network Integration
    • Impact Postback URL
    • ShareAsale integration
    • IncomeAccess
    • HitPath
    • Phonexa
    • CJ Affiliates Integration
    • AWin integration
    • Pepperjam integration
    • Google Ads Integration
    • 💡Bing Ads server to server tracking
    • Outbrain Postback URL
    • Google Analytics Goals
    • External references & links
    • Google Ads Tracking Template
    • Google Analytics Goal Template
    • Affiliate network integration request
    • Troubleshooting guidelines
    • Convertri Integration
    • ClickFunnels Integration
    • Unbounce Integration
    • How AnyTrack works with link trackers plugins
    • Thirsty Affiliates
    • Redirection
    • Pretty Links Integration with AnyTrack
    • Difference between Search terms and search keyword
    • Facebook Server-Side API (legacy)
Powered by GitBook
On this page
  • What is the AnyTrack tracking code?
  • An other tag
  • How and where to install the AnyTrack tracking code:
  • Data collection
  • Engagement tracking
  • AutoTag Affiliate and product links.
  1. docs

The AnyTrack Tracking Code

What is the AnyTrack tracking code, what it does and how to set it up.

PreviousAnyTrack Guide to Conversion TrackingNextAccount Setup Tutorial

Last updated 1 year ago

What is the AnyTrack tracking code?

The AnyTrack tracking code is a JavaScript that sits on your site, and whose role is to orchestrate your across your website, marketing channels, web analytics, affiliate networks or products you are promoting.

When you add a new property, a unique tracking code is generated which you should add to your site's <head>.

  • You should use this tracking code "as is" and preferably on one single domain.

  • The tracking code contains the property unique identifier asset_id .

AnyTrack Tracking Tag
!function(e,t,n,s,a){(a=t.createElement(n)).async=!0,
a.src="https://assets.anytrack.io/UNIQUE_ASSET_ID.js",
(t=t.getElementsByTagName(n)[0]).parentNode.insertBefore(a,t),
e[s]=e[s]||function(){(e[s].q=e[s].q||[]).push(arguments)}}(window,document,
"script","AnyTrack");

An other tag

<script>
!function(e,t,n,s,a){(a=t.createElement(n)).async=!0,
a.src="https://assets.anytrack.io/UNIQUE_ASSET_ID.js",
(t=t.getElementsByTagName(n)[0]).parentNode.insertBefore(a,t),
e[s]=e[s]||function(){(e[s].q=e[s].q||[]).push(arguments)}}(window,document,
"script","AnyTrack");
</script>

How and where to install the AnyTrack tracking code:

The code should be added in the <head> section of your site and can be installed using one of the following methods:

  • Directly in the HTML

  • Various Wordpress plugins that let you manage your site head and footer codes.

The Tracking code is added to your site's head, very much like you add Google Analytics, Facebook Pixel or any other tracking tag.

Data collection

When you add the tracking code on your site, AnyTrack will collect traffic related data:

  • UTM parameters

  • Referrers

  • User Agent

  • Custom URL parameters

This information is sent to the AnyTrack servers for processing and is used for further tracking and attribution.

Engagement tracking

  • Add a hidden field to your form with a default value set as {click_id}

  • Append a query string parameter to the links you wish to track ?subid={click_id}

  • If the links are recognized as affiliate links, AutoTrack and AutoTag will run without any further settings.

https://www.awin1.com/cread.php?s=2094107&v=7244&q=310900&r=403005

Google Analytics event tracking

AnyTrack will send event tracking to Google Analytics in real-time. There is no need to add any special scripts or tags or use any other plugins.

Facebook Pixel event tracking

AnyTrack will send event tracking to the Facebook Conversion API in real-time.

AutoTag Affiliate and product links.

In addition, AnyTrack will AutoTag links with subid and clickid to the links. These clickid/references will then be used for conversion tracking.

This is link from AWIN Affiliate Network. Once it has been identified, AnyTrack appends the query-string and parameter to the link pubref5=CEiJa8Vi4LYukXfzZsxsWD

https://www.awin1.com/cread.php?s=2094107&v=7244&q=310900&r=403005&=

With (or other tag managers)

Using the AnyTrack Plugin

AnyTrack will on-site events such as outbound clicks and form submissions. In order for the tracking code to recognize the links and forms to track as engagements, you can use the following helper

This is a link from the

Conversions originating from third party integrations such as affiliate networks, CRMs, API are also sent to the .

conversion data
Google Tag Manager
Affiliate Link Manager
AutoTrack
AWIN affiliate network
Facebook conversion API