Praevius Analytics Setup Guide
Complete setup guide for Google Tag Manager, GA4, and conversion tracking.
Quick Start Checklist
Step 1: Google Tag Manager Setup
1.1 Create GTM Account
- Go to tagmanager.google.com
- Click Create Account
- Fill in:
- Account Name:
Praeviusor your company name - Country:
United Kingdom
- Account Name:
- Container Name:
praevius.app - Target Platform:
Web - Accept Terms of Service
1.2 Get Your Container ID
After creation, note your Container ID (format: GTM-XXXXXXX)
1.3 Update Include Files
Edit /Users/robertkowalski/Documents/praevius-website/includes/gtm-head.html:
Replace GTM-XXXXXXX with your actual Container ID in this line:
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>Edit /Users/robertkowalski/Documents/praevius-website/includes/gtm-body.html:
Replace GTM-XXXXXXX with your actual Container ID:
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"Step 2: Google Analytics 4 Setup
2.1 Create GA4 Property
- Go to analytics.google.com
- Click Admin (gear icon)
- Click Create > Property
- Fill in:
- Property Name:
Praevius - Production - Reporting Time Zone:
United Kingdom - Currency:
British Pound (GBP)
- Property Name:
- Business details:
- Industry:
Technology - Size:
SmallorMedium
- Industry:
2.2 Create Data Stream
- Select Web platform
- Website URL:
https://praevius.app - Stream Name:
Praevius Website - Enable all Enhanced Measurement options
- Note your Measurement ID (format:
G-XXXXXXXXXX)
2.3 Configure GA4 in GTM
In GTM:
- Go to Tags > New
- Tag Configuration: Google Analytics: GA4 Configuration
- Measurement ID: Enter your
G-XXXXXXXXXX - Trigger: All Pages
- Name:
GA4 - Config - Praevius - Save
OR Import the container:
- Go to Admin > Import Container
- Select
/includes/gtm-container-export.json - Choose workspace
- Select Merge > Rename conflicting
- Update the “GA4 Measurement ID” variable with your ID
Step 3: Conversion Tracking Events
Events Tracked Automatically
The analytics-events.html file automatically tracks:
| Event | Description | Parameters |
|---|---|---|
view_pricing |
Pricing page visit | page_path, referrer |
view_features |
Features page visit | page_path |
free_trial_click |
Trial button clicks | cta_text, cta_location, plan_interest |
demo_request_click |
Demo button clicks | cta_location |
contact_click |
Contact button clicks | cta_location |
cta_click |
General CTA clicks | cta_text, cta_url, cta_location |
contact_form_started |
Form interaction begins | form_id, form_location |
contact_form_submitted |
Form submission | form_id, form_location |
scroll_depth |
Scroll milestones (25/50/75/90%) | scroll_percentage |
chatbot_opened |
Pipedrive chat opened | chatbot_type |
outbound_link_click |
External link clicks | link_url, link_text |
Mark Events as Conversions in GA4
- In GA4, go to Admin > Events
- Wait for events to appear (24-48 hours after first occurrence)
- Toggle Mark as conversion for:
free_trial_clickdemo_requestcontact_form_submitted
Step 4: Google Search Console
4.1 Add Property
- Go to search.google.com/search-console
- Click Add Property
- Choose URL prefix
- Enter:
https://praevius.app
4.2 Verify Ownership
Option A: HTML Meta Tag (Recommended)
- Select “HTML tag” verification
- Copy the verification code
- Edit
/includes/gtm-head.html - Replace
YOUR_VERIFICATION_CODEwith your code:
<meta name="google-site-verification" content="YOUR_ACTUAL_CODE" />Option B: DNS TXT Record
- Select “Domain name provider”
- Add TXT record to your DNS:
- Type: TXT
- Host: @ or praevius.app
- Value:
google-site-verification=YOUR_CODE
4.3 Connect to GA4
- In GA4: Admin > Product Links > Search Console Links
- Click Link
- Select your Search Console property
- Submit
4.4 Submit Sitemap
Add sitemap generation to _quarto.yml (if not already present):
website:
site-url: "https://praevius.app"
# ... other configThe sitemap will be at https://praevius.app/sitemap.xml
In Search Console: 1. Go to Sitemaps 2. Enter: sitemap.xml 3. Click Submit
Step 5: Microsoft Clarity (Optional - Free Heatmaps)
5.1 Create Clarity Project
- Go to clarity.microsoft.com
- Sign up with Microsoft account
- Create new project:
Praevius - Get your Clarity tracking code
5.2 Add via GTM
- In GTM: Tags > New
- Tag Type: Custom HTML
- HTML:
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "YOUR_CLARITY_PROJECT_ID");
</script>- Trigger: All Pages
- Name:
Clarity - Heatmaps - Save
Step 6: Build and Deploy
6.1 Render the Site
cd /Users/robertkowalski/Documents/praevius-website
quarto render6.2 Verify Files
Check that GTM code is present in output:
grep -l "googletagmanager" docs/*.html6.3 Deploy
git add .
git commit -m "Add Google Tag Manager and analytics tracking"
git pushStep 7: Testing and Verification
7.1 GTM Preview Mode
- In GTM, click Preview
- Enter:
https://praevius.app - Navigate around the site
- Check that tags fire correctly
7.2 GA4 DebugView
- In GA4: Admin > DebugView
- Browse your site with GTM Preview active
- Verify events appear in real-time
7.3 Chrome Extensions
Install these for testing: - Tag Assistant Legacy (by Google) - GA Debugger - dataLayer Inspector+
7.4 Common Issues
| Issue | Solution |
|---|---|
| Tags not firing | Check GTM container is published |
| Events not in GA4 | Verify Measurement ID is correct |
| Search Console not verified | Wait 24-48 hours, check meta tag placement |
| Clarity not loading | Check project ID, ensure no ad blockers |
Step 8: Publish GTM Container
Once testing is complete:
- In GTM: Click Submit
- Add version name:
Initial Analytics Setup - Add description of changes
- Click Publish
Event Reference
Data Layer Events
These events are pushed to dataLayer by analytics-events.html:
// CTA Click
{
'event': 'cta_click',
'cta_text': 'Start Free Trial',
'cta_url': 'https://app.praevius.app/start-trial',
'cta_location': 'hero',
'page_url': 'https://praevius.app/',
'page_path': '/',
'timestamp': '2025-12-31T12:00:00.000Z'
}
// Free Trial Click
{
'event': 'free_trial_click',
'cta_text': 'Start Free Trial',
'cta_url': 'https://app.praevius.app/start-trial?bundle=professional',
'cta_location': 'pricing_section',
'plan_interest': 'professional',
'page_url': 'https://praevius.app/pricing.html',
'page_path': '/pricing.html',
'timestamp': '2025-12-31T12:00:00.000Z'
}
// Form Submitted
{
'event': 'contact_form_submitted',
'form_id': 'contact-form',
'form_location': 'body',
'page_url': 'https://praevius.app/contact.html',
'page_path': '/contact.html',
'timestamp': '2025-12-31T12:00:00.000Z'
}Files Created
| File | Purpose |
|---|---|
/includes/gtm-head.html |
GTM head code + Search Console verification |
/includes/gtm-body.html |
GTM noscript fallback |
/includes/analytics-events.html |
Custom event tracking JavaScript |
/includes/gtm-container-export.json |
GTM container import file |
/includes/ANALYTICS_SETUP_GUIDE.md |
This guide |
Support Resources
Last updated: December 2025