Want to track visits, page views, and user activity across your website? Installing the PrettyInsights tracking snippet is the first step. This guide will walk you through the process in just a few minutes. PrettyInsights is a free google analytics alternative that will help you track website visits, organic traffic, tracking conversions and so much more.
The PrettyInsights tracking snippet is a lightweight JavaScript code that you add to your website. It collects anonymized visitor data like page views, referrers, and session behavior — all without slowing down your site or compromising user privacy.
Go to https://prettyinsights.com.
Log in using your email and password.
From your dashboard, click “Websites” in the sidebar.
Choose your website or click “Add New Website” to create a new one.
Once you’ve added your website:
Go to the Install Snippet tab.
You’ll see a small block of JavaScript code that looks like this:
<!-- PrettyInsights Tracking Snippet -->
<script async src="https://cdn.prettyinsights.com/pi.js"></script>
<script>
window.pi=window.pi||function(){(pi.q=pi.q||[]).push(arguments)};
pi('init', 'YOUR-WEBSITE-ID');
</script>
Click “Copy Code” to copy the snippet to your clipboard.
✅ Replace
YOUR-WEBSITE-ID
with your actual ID shown in the dashboard.
You need to paste the snippet just before the closing </head>
tag of your website’s HTML.
Open your HTML file and paste the code like this:
Go to your WordPress admin dashboard.
Install and activate a plugin like “Insert Headers and Footers”.
Navigate to Settings → Insert Headers and Footers.
Paste the snippet inside the Header section.
Click Save.
Look for a Custom Code or Site Header section in your builder’s settings and paste the snippet there.
After installation, go back to your PrettyInsights dashboard:
Open your website’s tracking page.
Visit your site in a new browser tab or device.
Refresh the dashboard – you should see live visitor activity or data updates.
If it doesn’t show up within 1–2 minutes, double-check that:
The code is placed before the </head>
tag.
Your Website ID is correct.
Caching plugins or CDNs (like Cloudflare) are not blocking JavaScript.
If you’re having trouble, reach out to our support team directly from your dashboard, or email us at admin@prettyinsights.com. We’ll get you set up in no time.
Once the snippet is installed, you can also start tracking custom events like button clicks, form submissions, or product views using the pi('event', 'event_name')
function.
Example:
You’re all set. PrettyInsights is now tracking your website visits, page views, and interactions in real time. Check back in your dashboard to explore your traffic sources, top-performing pages, user paths, and more.