AttributionHub Logo

Installing the Script

To begin collecting attribution data, place the following script in the <head> of every page on your website:

1<script>
2(function() {
3  var script = document.createElement('script');
4  script.src = 'https://track.attributionhub.io/scripts/hubspot_forms.min.js';
5  script.async = true;
6  script.onload = function() { window.attr_hubspot_forms(); };
7  document.head.appendChild(script);
8})();
9</script>

Coverage is Key

For accurate attribution, full script coverage is essential. Be sure to install the script:

  • On any page where conversions may occur (e.g. forms, signups, checkouts)
  • On key entry pages where users may first land (e.g. ads, SEO, social), such as landing pages, pricing, or blog content
  • Across all subdomains tied to your brand (e.g. app.example.com, blog.example.com)

Note: A single subscription covers your entire primary domain and all of its subdomains.

  • Primary domain: example.com
  • Subdomains: blog.example.com, landing.example.com, pages.example.com

Google Tag Manager Notice

While it’s technically possible to install the script via Google Tag Manager, we strongly discourage it.

 Many ad blockers and browsers block GTM-injected scripts, which can prevent the AttributionHub script from running.

 Instead, place the script directly in the <head> of your site to ensure full tracking accuracy.

Troubleshooting Tracking Issues

If you’re not seeing any or all of the tracking data you’re expecting:

  • Make sure the script is installed on all relevant pages, especially landing and conversion pages
  • Open your site in a browser and check the Console for errors related to track.attributionhub.io
  • Ensure the script appears in the page’s <head> tag when viewed in the browser

Tip: You can also inspect the browser cookies for a _attr_session value to confirm session creation is working.

Seeing data but no conversions?

  • Check that the form includes a valid email input
  • Confirm you're using the correct script version for your form type. Reach out to your account representative to confirm.
  • Try submitting using a real email to test.

Still not seeing data?

Contact your account representative for further assistance.