This guide shows you how to install Sona's lightweight tracking pixel (just 2KB!) on your web application to de-anonymize traffic, attribute marketing investments, understand user behavior, calculate intent signals, track customer journeys, and more. You'll learn the difference between tracking anonymous and identified users, and how to properly implement the pixel for maximum effectiveness. With this setup, you'll start gaining valuable insights into who's visiting your site and how they're engaging with your content.
When to Use This
When to Use This
Install the Sona tracking pixel when you want to:
De-anonymize website traffic and identify visitors
Track customer journeys across your web application
Understand user behavior on both public and private pages
Connect website activity to known contacts and accounts
Prerequisites:
Access to your website's HTML code or content management system
Ability to edit the
<head>
section of your web pagesAn active Sona account with tracking pixel access
Optional: Google Tag Manager access (alternative installation method)
Step-by-Step Instructions
Step-by-Step Instructions
A. Choose Your Tracking Script Type
A. Choose Your Tracking Script Type
Step 1: Determine your page type and user context
For pages requiring user login (dashboards, account pages, member areas): Use Identified Users tracking script
For public pages (homepage, landing pages, marketing content): Use Anonymous Users tracking script
Remember: Each page can only have one script, but different pages can use different script types
Step 2: Copy the appropriate tracking script
B. Install the Tracking Script
B. Install the Tracking Script
Step 3: Locate your page's HTML head section
Access your website's HTML code or CMS editor
Find the
<head>
tags in your page template or individual page
Step 4: Paste the tracking script
Insert the copied script between the opening
<head>
and closing</head>
tagsEnsure the script is placed before any other tracking or analytics code when possible
Step 5: Save and publish your changes
Save your HTML changes or publish through your CMS
The tracking pixel will now begin collecting data immediately
Key Concepts / Best Practices
Key Concepts / Best Practices
Understanding Script Types:
Anonymous Users Script: Captures visitor data without requiring login, ideal for lead generation and early-stage tracking
Identified Users Script: Links activity to known user accounts, perfect for post-login behavior analysis and customer journey mapping
Installation Best Practices:
Single Script Rule: Only install one tracking script per page to avoid conflicts
Mixed Implementation: Different pages can use different script types based on their function
Head Placement: Always place in the
<head>
section for optimal loading and data capture
Performance Optimization:
The 2KB script size ensures minimal impact on page load times
Consider setting up a Custom Tracking Domain (CNAME) to improve reliability
Direct HTML installation is more reliable than Google Tag Manager for avoiding ad blocker interference
Google Tag Manager Considerations:
While possible, GTM installation may be blocked by ad blockers
Direct HTML implementation provides better tracking reliability
Use GTM only if direct installation isn't feasible