1. JS Collector Quickstart
You need to ensure that the JS Collector is loaded into every page of your website or app. There are two ways to do this.
- Add the code snippet to your Product's footer template or main layout template (if you use one), OR
- Manually add the code snippet to every page of your website or app.
Tip: the best place to add this code is immediately before the closing </body> tag in your HTML.
Use this code snippet (but change 'EXAMPLE' to your own 'PID')
<script src="https://collector.prodlytic.com/collector.js" charset="utf-8" data-pid="EXAMPLE"></script>
Note that the ‘data-pid’ attribute is set to EXAMPLE here. You’ll need to use your own 'PID' value as supplied in your Prodlytic account.
2. Google Tag Manager
If your site uses Google Tag Manager (GTM) you can easily add a new Tag for Prodlytic.
Add a new "Custom HTML" Tag to Google Tag Manager and paste the Prodlytic JS Collector snippet into the HTML text area.
Important: You must check the “Support document.write” checkbox or the collector will not load.
We have a Prodlytic Wordpress plugin available which will automatically add the Prodlytic JS Collector into your Wordpress site or blog. Install the plugin, then add your product ID (PID) code and you're all set.
Exclude elements from being collected by Prodlytic by adding the CSS class
prodlytic_ignoreto the element
Content Security Policy
Content Security Policy (CSP) is a security standard supported by modern web browsers which aims to prevent cross-site scripting (XSS), clickjacking and other code injection exploits.
If your Product uses a CSP, you must add the Prodlytic domain before we can collect any data for you.
By adding *.prodlytic.com to your CSP you allow your user's web browser to load resources from the Prodlytic servers.
Content-Security-Policy: default-src 'self' *.prodlytic.com
Please head over to our Support section for any further questions.