Adding the Proxima Script

We have come up with a lightweight, fuss-free script that will do the hard work for you. All you need to do is copy the snippet and paste it in your site’s HTML code, right into the Header section. Make sure the script code is placed within the `<head>…</head>` tags, so it can start collecting data.

If you have chosen one of the popular CMS (content management systems) or site builder, you will find all the information you need in our integration guides. These will quickly and easily walk you through installation, so you can fully take advantage of the Proxima insights, no matter what tools you use.

The Proxima Script API

Our lightweight script, weighing in at less than 1kb, is designed with ease of use in mind. Simply add the script tag to your website, and you'll be ready to start gathering valuable insights. But for those who want to tailor the script to their specific needs, we've included a range of customizable options, so you can make Proxima work for you.

  • `data-site`: This attribute is required and specifies the unique identifier of your Proxima Analytics website.
  • `data-spa`: This attribute allows you to disable automatic pageview tracking for Single Page Applications. Set it to "off" to disable tracking, "hash" to monitor the URL hash for changes, or leave it blank to automatically track pageviews as history changes.
  • `data-manual`: Use this attribute to manually track pageviews and events by setting it to "on". By default, the script automatically starts monitoring once loaded.
  • `data-hostname`: Use this attribute to specify the hostname of the Proxima registered website, if you want to monitor multiple subdomains under the same Proxima Analytics site.
  • `data-url`: To use a self-hosted version of Proxima Analytics or if you're using a proxy, specify the URL of the Proxima Analytics API using this attribute.
  • `data-dnt`: To respect user's privacy, set this attribute to "on" the script will not track any data if the user has enabled Do Not Track in their browser.

Debugging

To troubleshoot any issues with the Proxima script, try enabling debugging by renaming the script file to script.debug.js. This will provide in-depth information about the script's performance in the browser's console, making it easier to identify and resolve any problems. Your final HTML code should then include the updated script file name, like so:

<script
  defer
  src="https://buzz.proxima.so/script.debug.js"
  data-site="XXXX"></script>

Keep in mind to switch back to the non-debug version of the script once you've resolved the issue, in order to provide a smooth experience for your website visitors.