Analytics Snippet
Install the Chatobserver snippet to measure how AI assistants drive traffic to your site. The snippet powers the Visitor Analytics strip on the Overview tab and the AI Referrals workspace.
Install the script
- Open the Analytics setup card on the Overview tab.
- Copy the snippet that includes your workspace project ID.
- Paste it inside the
<head>of every page you want to track. - Publish your changes and click Verify installation in the app.
<script>
(function() {
var script = document.createElement('script');
script.setAttribute('data-project-id', 'YOUR_PROJECT_ID');
script.src = 'https://cdn.chatobserver.com/js/client.min.js';
script.referrerPolicy = 'strict-origin-when-cross-origin';
script.async = true;
script.defer = true;
document.head.appendChild(script);
})();
</script>
- Replace
YOUR_PROJECT_IDwith the value shown in the dashboard. - Use
data-chatobserver-opt-out="true"on the<html>element to disable tracking on specific pages (for example, consent screens).
What the snippet captures
Each page view includes:
- Page URL, path, and title
- Referrer and referring host (e.g.,
chatgpt.com,perplexity.ai) - Device, browser, operating system, language, and timezone
- Session and visitor identifiers used to connect multiple hits
- UTM parameters already present on the page
Custom events
Track conversions or key interactions with the helper:
window.chatobserver.track('signup_completed', {
plan: 'pro',
source: 'ai-referral'
});
Custom events appear in the Events table on the AI Referrals tab. Properties
you pass are stored under props.
Verification states
- Script detected – Chatobserver found the snippet on your primary domain.
- Script not detected – Publish the snippet and verify again.
- Verification blocked – Your site prevented the check. Confirm manually and choose “Mark as installed.”
- Placeholder project ID – Replace the sample project ID with the value from your workspace.
Privacy tips
- Chatobserver does not capture personally identifiable information by default.
- Honor local consent requirements before loading the snippet.
- To remove data, take the snippet off your site and contact support@chatobserver.com with the domains and timeframe to purge.