From fe23ca6f0c483194210f1565373f774de1fa2b08 Mon Sep 17 00:00:00 2001 From: Dimitrie Hoekstra Date: Tue, 24 Mar 2026 23:29:06 +0100 Subject: [PATCH] Add PostHog tracking to pricing page - Fix hosting toggle: rename bare capture("cloud") to pricing-hosting-toggled with hosting property - Rename info-feature to pricing-feature-info-opened for consistency - Add pricing-feature-info-closed on dialog dismiss - Add pricing-feature-docs-clicked on "Learn more" links in dialogs - Add pricing-deep-link-arrived for tier badge deep link attribution --- src/_includes/feature_lists/features-table-base.njk | 2 +- src/pricing/index.njk | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/_includes/feature_lists/features-table-base.njk b/src/_includes/feature_lists/features-table-base.njk index dcf403790e..7d4ea00a2b 100644 --- a/src/_includes/feature_lists/features-table-base.njk +++ b/src/_includes/feature_lists/features-table-base.njk @@ -111,7 +111,7 @@ {% endif %} {% endfor %} {% if row.docsLink %} -

Learn more

+

Learn more

{% endif %} diff --git a/src/pricing/index.njk b/src/pricing/index.njk index 7c4e554518..e836a4cc0c 100644 --- a/src/pricing/index.njk +++ b/src/pricing/index.njk @@ -378,8 +378,12 @@ hubspot: // Scroll to hash target after hosting toggle (for tier badge links) if (window.location.hash) { + var hashTarget = window.location.hash; + if (typeof capture === 'function' && hashTarget.startsWith('#ff-feature--')) { + capture('pricing-deep-link-arrived', { hash: hashTarget, hosting: hosting, referrer: document.referrer }); + } setTimeout(function() { - var el = document.querySelector(window.location.hash); + var el = document.querySelector(hashTarget); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'center' }); }, 100); } @@ -403,7 +407,7 @@ hubspot: if (hosting === target) return; hosting = target; updateContentAndUrl(hosting); - capture(target); + if (typeof capture === 'function') capture('pricing-hosting-toggled', { hosting: target }); }); @@ -434,10 +438,11 @@ hubspot: