How to Install the AnyTrack Tag in Onepage.io

Learn about How to Install the AnyTrack Tag in Onepage.io in AnyTrack. Set up integration for conversion tracking and campaign optimization.

Overview

This guide shows how to install the AnyTrack Tag on Onepage.io, using its built-in integration with Google Tag Manager (GTM). It also includes a fix for Onepage.io’s link tracking issue, which can affect affiliate links or links that rely on tracking query parameters.


Step 1: Use Google Tag Manager

Onepage.io includes native support for GTM, making it the recommended method to install AnyTrack.

  1. Log in to Onepage.io.
  2. Go to Settings > Integrations > Google Tag.
  3. Paste your GTM container ID (e.g., GTM-XXXXXXX) in the field.
  4. In Google Tag Manager:
    • Create a new tag.
    • Choose AnyTrack from the Community Template Gallery.
    • Paste your Tracking ID from your AnyTrack Property Settings.
    • Set trigger to All Pages and publish the container.

🔗 Full GTM Setup Guide


Step 2: Onepage.io Link Tracking Fix

Onepage.io sometimes removes query parameters from links after click events. This behavior interferes with Click ID tracking and can break conversion attribution.

To resolve this, insert the following JavaScript snippet at the end of the<body> :

<script>
  (function () {
    "use strict";
    setTimeout(() => {
      const i = (...args) => console.info("%c<>", "color: #217DED; font-weight: bold;", ...args);
      document.querySelectorAll("a[data-at-href]").forEach((el) => {
        el.parentNode.replaceChild(el.cloneNode(true), el);
        i("Fixed link", el.getAttribute("data-at-href"));
      });
      i("Custom script ran");
    }, 1000);
  })();
</script>
🧠

This ensures that links using data-at-href are restored with their original parameters before click, preserving your Click ID.


Step 3: Test & Verify

  1. Open your landing page in incognito mode.
  2. Use developer tools to check the console logs for:
    • Custom script ran
    • Fixed link: https://...
  3. Check your AnyTrack dashboard for incoming traffic and click events.

Troubleshooting

  • Ensure GTM and the script are both published.
  • Make sure links use data-at-href, not just href.
  • Clear caching or use a private tab for fresh testing.