An introduction to snippet configuration

Our snippet configuration allows you to change tracking behaviour to your preference. For example, if you wish to temporarily track metric attribution/sub-parts information, you can enable and disable this at any time.

Our snippet configuration is designed to be able to make adjustments without needing to change anything in your GTM tag container (or inlined snippet). You might only need to change your embedded snippet script in very specific but limited scenario's.

To start adjusting your tracking snippet configuration, navigate to your domain settings and click on the "configure snippet" button.

The panels that will appear in the modal are explained in the following sections.

Self-hosting

You might want to self-host our RUM JavaScript for either privacy or security reasons. Or maybe even to add custom JavaScript on top of what we're allowing you to change with our snippet configuration.

Content Security Policy

Self-hosting should perfectly work. If you're hosting the JavaScript file on a subdomain, be sure to check your Content Security Policy. Our Content Security Policy won't be able to check your headers to verify if the snippet is eligible to run and beacon RUM data.

Be sure to check this yourselves by either checking your document's response headers first, or check for Content Security Policy warning in the JS Console of the DevTools in your browser. Below is a screenshot of a JS error when trying to run our script in a Chrome incognito page.

If you run into a similar error for a file with RUM- in the directory, then your CSP is blocking the functionality of our script.

Refresh-rate and caching

Below covers update responsibility when choosing to self-host our RUM JavaScript. Check our JavaScript update section to see how often we are updating the JavaScript.

Our architecture is designed to automatically update the RUM JavaScript when changes are made within the RUMvision dashboard. When self-hosting, you won't benefit from this anymore.

Be sure to:

  • periodically fetch the latest contents of your domain's RUM JavaScript by using its tag-id to automatically update your self-hosted JavaScript. You could do this by writing a cronjob.
  • prevent a long caching duration for the JavaScript file itself. Otherwise, even when your cronjob is able to fetch latest changes without too much delay, previous visitors with a cached RUM JavaScript file might not become part of your new settings (for example, newly added URL's)

Did you adjust your snippet configuration? Learn more about how soon you should see new data.