---
# === IDENTITY ===
id: software/landing-pages/analytics-implementation/2026
canonical_question: "How do I implement analytics — GA4 setup, conversion events, Hotjar/Posthog heatmaps, UTM strategy, ad pixels?"
aliases:
  - "GA4 setup guide for landing pages with conversion tracking"
  - "How to add Hotjar or Posthog heatmaps to my landing page"
  - "UTM parameter strategy for paid ads and landing pages"
  - "Meta Pixel and Google Ads conversion tracking setup"
entity_type: execution_recipe
domain: software > landing-pages > analytics implementation
region: global
jurisdiction: global
temporal_scope: 2025-2026

# === VERIFICATION ===
last_verified: 2026-03-12
confidence: 0.90
version: 1.0
first_published: 2026-03-12

# === TEMPORAL VALIDITY ===
temporal_validity:
  status: evolving
  last_breaking_change: "GA4 renamed 'Conversions' to 'Key Events' in mid-2024; Hotjar merged into Contentsquare platform in 2025 with new pricing tiers"
  next_review: 2026-09-08
  change_sensitivity: high

# === CONSTRAINTS ===
constraints:
  - "GA4 free tier has no row limit but sampled data above 500K sessions — use BigQuery export for unsampled data at scale"
  - "Hotjar free plan limits to 35 daily session recordings — for higher volume, Growth plan starts at $49/mo"
  - "PostHog free tier includes 1M events/month and 5K session replays — sufficient for most landing pages"
  - "Meta Pixel requires a Facebook Business Manager account and verified domain ownership"
  - "Cookie consent banners required in EU (GDPR) and certain US states — analytics scripts must respect user consent preferences"
  - "Ad blockers block GA4 and Meta Pixel on 25-40% of desktop traffic — server-side tracking or proxy setups mitigate but add complexity"

# === SKIP CONDITIONS ===
skip_this_unit_if:
  - condition: "User needs to choose an analytics platform, not implement one"
    use_instead: "Search knowledgelib.io for startup analytics implementation — no dedicated unit yet"
  - condition: "User needs A/B testing, not analytics"
    use_instead: "software/landing-pages/ab-testing-infrastructure/2026"
  - condition: "User needs full marketing automation analytics"
    use_instead: "business/marketing-execution/email-marketing-automation-setup/2026"

# === AGENT HINTS ===
inputs_needed:
  - key: tool_preference
    question: "Which analytics platform should be used?"
    type: choice
    options: ["GA4 only", "GA4 + Hotjar", "GA4 + PostHog", "PostHog only", "no preference — auto-select"]
  - key: technical_skill
    question: "What is the user's technical skill level?"
    type: choice
    options: ["non-technical (no-code only)", "semi-technical (can edit code)", "developer (can write code)"]
  - key: budget_for_tools
    question: "What's the tool/API budget?"
    type: choice
    options: ["free tier only", "up to $50/month", "up to $200/month", "no limit"]
  - key: ad_platforms
    question: "Which ad platforms will drive traffic?"
    type: choice
    options: ["Google Ads", "Meta (Facebook/Instagram)", "Both Google + Meta", "None (organic only)", "Other"]

# === EXECUTION METADATA ===
execution:
  required_inputs:
    - name: "Deployed landing page"
      source: "software/landing-pages/landing-page-platform-deployment/2026"
      format: "live URL with code editing access"
    - name: "Business goals and conversion actions"
      source: "user or strategy agent"
      format: "list of what counts as a conversion (form submit, button click, purchase)"
  outputs:
    - name: "Analytics-instrumented landing page"
      format: "live URL with tracking scripts"
      description: "Landing page with GA4, heatmaps, and ad pixels all firing correctly"
    - name: "UTM parameter template"
      format: "spreadsheet or text document"
      description: "Standardized UTM naming convention for all traffic sources"
    - name: "Conversion event configuration"
      format: "GA4 key events + ad platform conversions"
      description: "All conversion events configured and verified in GA4, Google Ads, and Meta"
  tools_required:
    - name: "Google Analytics 4"
      purpose: "Core web analytics — traffic, behavior, conversions"
      tier: "free"
      cost: "$0"
      alternatives: ["Plausible ($9/mo)", "Fathom ($14/mo)", "Simple Analytics ($19/mo)"]
    - name: "Heatmap tool"
      purpose: "Visualize clicks, scroll depth, rage clicks"
      tier: "free or paid"
      cost: "$0 (PostHog free / Hotjar free) to $49/mo (Hotjar Growth)"
      alternatives: ["PostHog", "Hotjar", "Microsoft Clarity (free)", "heatmap.com"]
    - name: "Google Tag Manager"
      purpose: "Centralized tag deployment without code changes"
      tier: "free"
      cost: "$0"
      alternatives: ["Manual script injection", "Segment ($120/mo+)"]
    - name: "Meta Pixel"
      purpose: "Facebook/Instagram ad conversion tracking"
      tier: "free"
      cost: "$0"
      alternatives: ["Meta Conversions API (server-side)"]
  credentials_needed:
    - service: "Google Analytics 4"
      type: "Google account"
      where_to_get: "https://analytics.google.com"
      free_tier_limits: "Unlimited standard use, sampled data above 500K sessions"
    - service: "Google Tag Manager"
      type: "Google account"
      where_to_get: "https://tagmanager.google.com"
      free_tier_limits: "Unlimited"
    - service: "PostHog"
      type: "username+password or Google OAuth"
      where_to_get: "https://posthog.com/signup"
      free_tier_limits: "1M events/month, 5K session replays"
    - service: "Meta Business Manager"
      type: "Facebook account"
      where_to_get: "https://business.facebook.com"
      free_tier_limits: "Unlimited pixel tracking"
  estimated_duration: "45-90 minutes for full analytics stack"
  estimated_cost: "$0 (all free tiers) to $49/mo (Hotjar Growth)"

# === DISTRIBUTION ===
canonical_source: "https://knowledgelib.io/software/landing-pages/analytics-implementation/2026"
suggested_citation: "Source: knowledgelib.io — AI Knowledge Library (verified 2026-03-12)"

# === RELATED UNITS ===
related_kos:
  depends_on:
    - id: "software/landing-pages/landing-page-platform-deployment/2026"
      label: "Landing page must be deployed before adding analytics"
    - id: "software/landing-pages/form-lead-capture-setup/2026"
      label: "Form events needed for conversion tracking"
  feeds_into:
    - id: "software/landing-pages/ab-testing-infrastructure/2026"
      label: "Analytics data needed to measure A/B test results"
    - id: "software/landing-pages/performance-optimization-core-web-vitals/2026"
      label: "Analytics reveals performance bottlenecks"
  alternative_to: []

# === SOURCES ===
sources:
  - id: src1
    title: "Set up events — Google Analytics for Developers"
    author: Google
    url: https://developers.google.com/analytics/devguides/collection/ga4/events
    type: official_docs
    published: 2025-01-01
    reliability: authoritative
  - id: src2
    title: "PostHog vs Hotjar: In-depth Tool Comparison"
    author: PostHog
    url: https://posthog.com/blog/posthog-vs-hotjar
    type: technical_blog
    published: 2025-06-01
    reliability: high
  - id: src3
    title: "Google Ads Conversion Tracking Setup 2026"
    author: Stape
    url: https://stape.io/blog/google-ads-conversion-tracking
    type: technical_blog
    published: 2026-01-01
    reliability: high
  - id: src4
    title: "Contentsquare Pricing — Hotjar Plans"
    author: Hotjar
    url: https://www.hotjar.com/pricing/
    type: official_docs
    published: 2025-01-01
    reliability: authoritative
  - id: src5
    title: "UTM Parameters for Facebook Ads: Complete Guide"
    author: AdManage
    url: https://admanage.ai/blog/utm-parameters-for-facebook-ads
    type: technical_blog
    published: 2025-01-01
    reliability: high
  - id: src6
    title: "GA4 Conversion Tracking Guide 2026"
    author: InfluenceFlow
    url: https://influenceflow.io/resources/google-analytics-4-conversion-tracking-complete-guide-for-2026/
    type: technical_blog
    published: 2026-01-01
    reliability: high
  - id: src7
    title: "Google Ads Conversion Tracking with Google Tag Manager"
    author: Analytics Mania
    url: https://www.analyticsmania.com/post/google-ads-conversion-tracking-with-google-tag-manager/
    type: technical_blog
    published: 2025-01-01
    reliability: high
---

# Analytics Implementation for Landing Pages

## Purpose

This recipe instruments a landing page with a complete analytics stack — GA4 for traffic and conversion tracking, heatmaps (PostHog or Hotjar) for behavior visualization, a standardized UTM parameter strategy, and ad platform pixels (Google Ads, Meta) for campaign attribution. The output is a fully tracked landing page where every visit, click, scroll, and conversion is measurable with attribution to the traffic source that drove it. [src1]

## Prerequisites

- [ ] **Deployed landing page** available from `landing-page-platform-deployment` — [Landing Page Platform Deployment](/software/landing-pages/landing-page-platform-deployment/2026)
- [ ] **Google account** — for GA4 and GTM access at [analytics.google.com](https://analytics.google.com)
- [ ] **Conversion goals defined** — list of what counts as a conversion (form submission, CTA click, scroll to pricing)
- [ ] **Code editing access** — ability to add scripts to the landing page `<head>` section
- [ ] **Meta Business Manager account** (if running Meta ads) — [business.facebook.com](https://business.facebook.com)

## Constraints

- GA4 is free with no row limits, but data is sampled above 500K sessions. For unsampled data at scale, export to BigQuery ($0-5/mo for most landing pages). [src1]
- Hotjar free plan: 35 daily session recordings. PostHog free plan: 1M events/month, 5K session replays. Microsoft Clarity: unlimited and free. [src2] [src4]
- Ad blockers block GA4 on 25-40% of desktop traffic. Server-side tagging via GTM Server-Side mitigates this but requires Cloud Run hosting ($5-15/mo). [src3]
- Meta Pixel requires verified domain ownership in Facebook Business Manager. Without verification, event data may be limited or delayed.
- Cookie consent is required for EU visitors (GDPR) and increasingly for US visitors (CCPA, state laws). Analytics scripts must fire only after consent is granted.

## Tool Selection Decision

```
Which path?
├── Free + simple
│   └── PATH A: GA4 + Microsoft Clarity — $0, basic heatmaps + full analytics
├── Free + comprehensive
│   └── PATH B: GA4 + PostHog — $0, advanced heatmaps + session replay + analytics
├── Paid + non-technical
│   └── PATH C: GA4 + Hotjar Growth — $49/mo, visual heatmaps + user surveys
└── Developer + all-in-one
    └── PATH D: PostHog only — $0, replaces GA4 + heatmaps in one tool
```

| Path | Tools | Cost | Setup Time | Best For |
|------|-------|------|------------|----------|
| A: GA4 + Clarity | GA4 + Microsoft Clarity | $0 | 30 min | Budget-conscious, basic needs |
| B: GA4 + PostHog | GA4 + PostHog Cloud | $0 | 45 min | Developers, comprehensive tracking |
| C: GA4 + Hotjar | GA4 + Hotjar Growth | $49/mo | 45 min | UX teams, visual insights |
| D: PostHog Only | PostHog Cloud | $0 | 30 min | Developers wanting single platform |

## Execution Flow

### Step 1: Set Up Google Tag Manager (GTM)

**Duration**: 10 minutes
**Tool**: Google Tag Manager

GTM is the recommended deployment method — it centralizes all tracking scripts and allows updates without code changes.

1. Go to [tagmanager.google.com](https://tagmanager.google.com), create an account and container (Web type)
2. Copy the two GTM snippets:

```html
<!-- GTM head snippet — paste as high in <head> as possible -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>

<!-- GTM body snippet — paste immediately after opening <body> -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
```

3. Replace `GTM-XXXXXXX` with your container ID
4. Deploy the snippets to your landing page

**Verify**: Open browser DevTools → Network tab, search for "gtm.js" — it should load with 200 status. In GTM, click Preview → enter your URL → Tag Assistant should connect.
**If failed**: Check that the snippets are in the correct positions (head/body). If Tag Assistant cannot connect, verify no ad blocker is active during testing.

### Step 2: Configure GA4 via GTM

**Duration**: 10-15 minutes
**Tool**: Google Analytics 4 + GTM

1. Create a GA4 property at [analytics.google.com](https://analytics.google.com) → Admin → Create Property
2. Create a Web data stream → copy the Measurement ID (G-XXXXXXXXXX)
3. In GTM, create a GA4 Configuration tag:

```
Tag Type:    Google Analytics: GA4 Configuration
Measurement ID: G-XXXXXXXXXX
Trigger:     All Pages
```

4. Set up custom conversion events. In GTM, create tags for each conversion:

```
Event: form_submit
Tag Type:    Google Analytics: GA4 Event
Event Name:  generate_lead
Parameters:
  form_id:   {{Form ID}}
  form_name: {{Form Name}}
Trigger:     Form Submission (configure for your form element)

Event: cta_click
Tag Type:    Google Analytics: GA4 Event
Event Name:  cta_click
Parameters:
  button_text: {{Click Text}}
  button_url:  {{Click URL}}
Trigger:     Click — matches CSS selector ".cta-button"
```

5. In GA4, mark conversion events: Admin → Key Events → mark `generate_lead` as a Key Event [src1] [src6]

**Verify**: Submit your form and click your CTA. In GA4 → Realtime, you should see the events within 30 seconds. Check DebugView (Admin → DebugView) for detailed event parameters.
**If failed**: If events are not firing, check GTM Preview mode for trigger conditions. Common issue: form trigger not matching because the form uses AJAX submission instead of standard form POST.

### Step 3: Add Heatmap and Session Recording Tool

**Duration**: 10 minutes
**Tool**: PostHog, Hotjar, or Microsoft Clarity

**PostHog (recommended for developers):**

In GTM, create a Custom HTML tag:

```html
<script>
  !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onFeatureFlags onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
  posthog.init('YOUR_PROJECT_API_KEY', {api_host: 'https://us.i.posthog.com'});
</script>
```

Trigger: All Pages. Replace `YOUR_PROJECT_API_KEY` with your PostHog project key from Settings → Project API Key. [src2]

**Hotjar:**

```html
<script>
  (function(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:YOUR_SITE_ID,hjsv:6};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
  })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
```

Replace `YOUR_SITE_ID` with your Hotjar Site ID from Site Settings.

**Microsoft Clarity (free, unlimited):**

```html
<script>
  (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_PROJECT_ID");
</script>
```

**Verify**: Visit your landing page, click around, scroll. Check the heatmap tool dashboard — you should see your session appearing within 1-2 minutes. PostHog: Activity → Live Events. Hotjar: Recordings. Clarity: Dashboard.
**If failed**: Check that the script loads in browser DevTools Network tab. If blocked by ad blocker, test in incognito. PostHog can be self-hosted or proxied through your domain to avoid ad blockers.

### Step 4: Implement UTM Parameter Strategy

**Duration**: 10 minutes
**Tool**: Spreadsheet + ad platform settings

Create a standardized UTM naming convention:

```
UTM Parameter Template:
─────────────────────────────────────────
utm_source:   Platform name (google, facebook, instagram, linkedin, email, direct)
utm_medium:   Traffic type (cpc, cpm, paid-social, email, organic, referral)
utm_campaign: Campaign name (spring-launch, product-beta, webinar-march)
utm_content:  Ad variant (hero-image-a, video-testimonial, text-only)
utm_term:     Keyword (for Google Ads — auto-filled by ValueTrack)

Examples:
─────────────────────────────────────────
Google Ads:     ?utm_source=google&utm_medium=cpc&utm_campaign=spring-launch&utm_term={keyword}
Meta Ads:       ?utm_source=facebook&utm_medium=paid-social&utm_campaign=spring-launch&utm_content={{ad.name}}
Email:          ?utm_source=mailchimp&utm_medium=email&utm_campaign=welcome-series&utm_content=cta-button
LinkedIn:       ?utm_source=linkedin&utm_medium=paid-social&utm_campaign=b2b-awareness
```

**Rules**: Always lowercase. Use hyphens, not spaces or underscores. Add UTMs in the ad platform's "Tracking" or "URL Parameters" field — never in the destination URL field. [src5]

**Verify**: Click a test ad or email link with UTMs. In GA4 Realtime → Traffic Acquisition, you should see the source/medium/campaign values.
**If failed**: If UTMs appear as "(not set)", check that the parameters are appended correctly to the URL. Common issue: UTMs placed in the wrong field in Meta Ads Manager.

### Step 5: Install Ad Platform Conversion Pixels

**Duration**: 10-15 minutes
**Tool**: GTM + ad platforms

**Google Ads Conversion Tag (via GTM):** [src3] [src7]

1. In Google Ads → Goals → Conversions → New conversion action → Website
2. Name the conversion (e.g., "Lead Form Submit"), set category to "Lead"
3. Copy the Conversion ID and Conversion Label
4. In GTM, create tags:

```
Tag 1: Conversion Linker
Tag Type:    Conversion Linker
Trigger:     All Pages

Tag 2: Google Ads Conversion Tracking
Tag Type:    Google Ads Conversion Tracking
Conversion ID:    AW-XXXXXXXXX
Conversion Label: XXXXXXXXXXXXXXXXXXXX
Trigger:     Custom Event — "generate_lead" (same trigger as GA4 form submit)
```

**Meta Pixel (via GTM):**

1. In Meta Events Manager → Pixels → Create Pixel → Copy Pixel ID
2. In GTM, create a Custom HTML tag:

```html
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', 'YOUR_PIXEL_ID');
  fbq('track', 'PageView');
</script>
```

Trigger: All Pages. Then create a separate tag for Lead events:

```html
<script>
  fbq('track', 'Lead', {
    content_name: 'Landing Page Form',
    content_category: 'lead_capture'
  });
</script>
```

Trigger: Form Submission (same trigger as your GA4 form event).

**Verify**: Use Meta Pixel Helper Chrome extension — it should show a PageView event on page load and a Lead event on form submit. In Google Ads, check conversion status shows "Recording conversions" within 24 hours.
**If failed**: If Meta Pixel Helper shows errors, verify the Pixel ID is correct. If Google Ads shows "Unverified", check that the Conversion Linker tag fires on all pages.

### Step 6: Verify All Tracking End-to-End

**Duration**: 10 minutes
**Tool**: Browser + all analytics dashboards

```
Analytics verification checklist:
─────────────────────────────────────────
1. Open landing page in incognito (disable ad blocker)
2. Append UTM parameters: ?utm_source=test&utm_medium=cpc&utm_campaign=verify
3. Check GA4 Realtime: page_view event with correct source/medium
4. Scroll to bottom of page
5. Check heatmap tool: session recording started, scroll depth tracked
6. Submit lead capture form
7. Check GA4 Realtime: generate_lead event fires
8. Check Google Ads: conversion recorded (may take up to 3 hours)
9. Check Meta Events Manager: Lead event recorded
10. Check GTM Preview: all tags fired in correct order
```

**Verify**: All 10 checkpoints pass. Events appear in all connected platforms.
**If failed**: Use GTM Preview/Debug mode to identify which tags are not firing. Check trigger conditions match actual page behavior. For Meta, use the Test Events tool in Events Manager.

## Output Schema

```json
{
  "output_type": "analytics_instrumented_page",
  "format": "configured tracking stack",
  "columns": [
    {"name": "ga4_measurement_id", "type": "string", "description": "GA4 Measurement ID (G-XXXXXXXXXX)", "required": true},
    {"name": "gtm_container_id", "type": "string", "description": "GTM Container ID (GTM-XXXXXXX)", "required": true},
    {"name": "heatmap_tool", "type": "string", "description": "Heatmap platform and project ID", "required": true},
    {"name": "conversion_events", "type": "array", "description": "List of configured conversion events", "required": true},
    {"name": "utm_template", "type": "string", "description": "Standardized UTM naming convention document", "required": true},
    {"name": "ad_pixels", "type": "array", "description": "Configured ad platform pixels (Google Ads, Meta)", "required": false}
  ],
  "expected_row_count": "1",
  "sort_order": "N/A",
  "deduplication_key": "ga4_measurement_id"
}
```

## Quality Benchmarks

| Quality Metric | Minimum Acceptable | Good | Excellent |
|---------------|-------------------|------|-----------|
| GA4 data collection | Page views recording | Events + conversions tracking | Enhanced measurement + custom dimensions |
| Heatmap coverage | Click heatmap working | Click + scroll + session replay | Rage click detection + form analytics |
| UTM attribution | Source/medium tracked | Campaign + content tracked | Full funnel attribution in GA4 |
| Ad pixel accuracy | Pixel fires on page load | Conversion events fire correctly | Enhanced conversions + server-side enabled |
| Data completeness | > 60% of traffic tracked | > 75% tracked | > 90% tracked (server-side) |

**If below minimum**: Check GTM Preview for tag firing issues. If data completeness is below 60%, implement server-side tracking to bypass ad blockers.

## Error Handling

| Error | Likely Cause | Recovery Action |
|-------|-------------|----------------|
| GA4 Realtime shows no data | GTM container not published or tag misconfigured | Publish GTM container; verify GA4 Configuration tag fires on All Pages |
| "Not set" in GA4 source/medium | UTMs stripped by redirect or missing from URL | Check landing page redirects preserve query parameters; verify UTM placement in ad platform |
| Heatmap shows no sessions | Script blocked by ad blocker or CSP | Test in incognito; add tool domain to CSP; consider self-hosted PostHog |
| Meta Pixel Helper shows error | Pixel ID incorrect or duplicate pixel initialization | Verify Pixel ID in Events Manager; ensure only one fbq('init') call per page |
| Google Ads "Unverified" conversion | Conversion Linker tag missing or not firing on all pages | Add Conversion Linker tag in GTM with All Pages trigger |
| Double-counting conversions | Multiple tags firing for same event | Use GTM tag sequencing; add conditions to prevent duplicate fires |

## Cost Breakdown

| Component | Free Tier | Paid Tier | At Scale |
|-----------|-----------|-----------|----------|
| GA4 | $0 (unlimited standard) | $0 | $150K+/yr (GA4 360) |
| GTM | $0 (unlimited) | $0 | $0 |
| Heatmaps (PostHog) | $0 (1M events, 5K replays) | $0 (generous free) | Pay-per-use beyond free |
| Heatmaps (Hotjar) | $0 (35 sessions/day) | $49/mo Growth | Custom Pro/Enterprise |
| Heatmaps (Clarity) | $0 (unlimited) | $0 | $0 |
| Meta Pixel | $0 | $0 | $0 |
| Google Ads Pixel | $0 | $0 | $0 |
| **Total** | **$0** | **$0-49/mo** | **$49-200/mo** |

## Anti-Patterns

### Wrong: Adding analytics scripts directly to page code without GTM
Hardcoding GA4, Hotjar, and pixel scripts directly into your HTML makes updates require code deployments. Every new tag means developer time and deployment risk. [src3]

### Correct: Use Google Tag Manager for all tracking scripts
Deploy GTM once, then manage all analytics tags from the GTM dashboard. Changes go live instantly without code deployments. The only script in your page code should be the GTM container snippet.

### Wrong: Not testing with ad blockers
Building analytics without accounting for ad blockers gives you false confidence in your data. If 30% of desktop visitors block GA4, your conversion rate calculations are wrong. [src2]

### Correct: Monitor blocked rate and implement fallbacks
Use server-side GTM or proxy your analytics through your own domain (e.g., analytics.yourdomain.com) to reduce blocking. At minimum, acknowledge the gap in your reporting.

## When This Matters

Use this recipe when the agent needs to instrument a landing page with analytics — from basic page view tracking through conversion events, heatmaps, and ad pixel attribution. Requires a deployed landing page with code editing access. This recipe installs and configures the tracking tools; it does not analyze the data or make optimization decisions.

## Related Units

- [Landing Page Platform Deployment](/software/landing-pages/landing-page-platform-deployment/2026) — deploy the page before adding analytics
- [Form Lead Capture Setup](/software/landing-pages/form-lead-capture-setup/2026) — form events needed for conversion tracking
- [A/B Testing Infrastructure](/software/landing-pages/ab-testing-infrastructure/2026) — use analytics data to measure experiments
- [Performance Optimization: Core Web Vitals](/software/landing-pages/performance-optimization-core-web-vitals/2026) — analytics can reveal performance issues
