Skip to main content

Configure your tag

Create a site

Before you can use Hitprobe, you’ll need to create an account, and add details of the site where you want to add the Hitprobe tag. There's a free plan with up to 50 sessions (clicks) a month, perfect for implementation and testing for as long as you need.

First, create an account. Then follow the steps to create your first site.

If you intend to use Hitprobe on multiple subdomains, make sure you enter your site's domain, not the subdomain. I.e. Use example.com and not signup.example.com. You can then use the same Hitprobe site key on example.com, signup.example.com, and other.example.com.

For each domain name you use, you'll need to create a separate site. Each site will have its own site key.

Get your site key

First, select the site you need the site key for in the site switcher (top left directly under the Hitprobe logo). Then select Manage site from the menu. You'll find your site key under the Integration section. Copy this key so you can use it shortly.

info

The site key is in a UUID format, so it should look something like this: 3748eaee-7408-4fee-9e42-4d5d94e5f2e9.

danger

Make sure you copy the site key and not the secret key. The secret key is only to be used server side and should be protected as a credential just like any other authentication token.

Create the tag

The Hitprobe tag is shown below:

<script>
(function(h,t,p,r,o,b,e){h['HitprobeObject']=o;h[o]=h[o]||function(){
(h[o].q=h[o].q||[]).push(arguments)},h[o].l=1*new Date();b=t.createElement(p),
e=t.getElementsByTagName(p)[0];b.async=1;b.src=r;e.parentNode.insertBefore(b,e)
})(window,document,'script','https://app.hitprobe.com/p/v1.js','hp');
hp('init', { siteKey: '<your_site_key>' });
</script>

You'll need to at least swap in your site key, continue to the next section for details.

Tag options

The tag's init method accepts a config object that allows you to set options for the tag. You must at least replace <your_site_key> with the site key you copied earlier. At this point you may also want to set other options too.

hp('init', { siteKey: '<your_site_key>', mode: 'tracked' });

siteKey

Replace with the site key you copied earlier.

mode

You can use the mode setting to tell the tag which types of visits/clicks to send to Hitprobe. By default (when omitted) it's set to 'tracked'. This sends events to Hitprobe whenever the click comes from a supported PPC network (i.e. Google) or has UTM/source tracking tags.

The available settings are:

  • tracked (default) - clicks originating from a supported PPC network or with UTM/source tracking tags.
  • ppc - clicks from any supported PPC network.
  • ppc_google - clicks from Google only.
  • ppc_meta - clicks from Meta only.
  • all - clicks from any source, including organic.

Content Security Policies (CSPs)

If your site declares a CSP (Content Security Policy), you will need to add Hitprobe's domains to your policy.

DirectiveAdd the domain
script-src*.hitprobe.com, *.hitprobe.net
connect-src*.hitprobe.com, *.hitprobe.net

This allows your page to load the agent from app.hitprobe.com, and then reach Hitprobe's platform from within the script.

What next?

Choose how you would like to deploy your tag: