Adding a tracking script is the first step to unlocking the full power of Positive User. It allows your team to see how people interact with your site, turning anonymous visits into rich contact profiles. By implementing this snippet, you can begin gathering the data needed to trigger personalized automations and manage your customer relationships effectively.
Inserting a tracking script means placing a small snippet of code on your site that tracks cookies once your visitors give their consent. This snippet acts as a bridge, connecting your imported contacts with their website activity and synchronizing their records so you can see their journey in real-time. Beyond data collection, this script powers your entire "website experience" giving you the ability to show pop-ups, start conversations through the chat widget, and display custom widgets to your audience.
Before implementing the script, ensure your environment is configured to communicate with Positive User servers:
Domain Whitelisting: For security, you should restrict which domains can send data to your workspace. Go to "Settings" → "Workspace Settings" → "Security" → "Domains". Add your production and staging domains (e.g., example.com and staging.example.com). If you use a "www" prefix, add it explicitly.
Access: You will need access to your website's source code or a tag management tool like Google Tag Manager.
Content Security Policy (CSP): If your site uses a strict CSP, you must allow https://*.user.com, https://media.user.com, https://widget.user.com to prevent the browser from blocking the script.
Cloudflare Rocket Loader: If you use Cloudflare, the script requires the data-cfasync="false" attribute to load correctly (included in the standard snippet).
Every workspace has two unique elements that identify your data: workspace key and your workspace domain. Both of them are required for tracking script customization.
In your Positive User Workspace, navigate to "Settings" → "Workspace Settings" → "API & Integrations" → "Setup & Integrations". In top right corner you will find both values.

If you click on “Standard integration” module in this section of the application, you will find full tracking script snippet automatically filled with the workspace key and workspace domain.

The script needs to be present on every page where you want to track your contacts.
Open your website's source code.
Paste the copied snippet immediately before the closing </body> tag.
If you use a tag manager, create a new "Custom HTML" tag, paste the snippet, and set it to trigger on all pages.
You can send more data with the script (update contact and company attributes). To do so, check additional instructions from the Developer’s Guide.
Additionally you can proceed with full configuration via GTM. For more details check:
How to Send an Event with GTM [LINK]
Once the script is live, you should confirm that it is firing correctly.
Check the “Contacts” section: Go to "Data" → "Contacts Section". You should see new, anonymous contacts appearing as they visit your site.
Browser console test: Open your website, right-click and select "Inspect", then open the "Console" tab. Type civchat and press enter. If it returns an object containing your workspace key and a userKey, the script is working.

How to Send an Event with GTM [LINK]