From f28b018e9994028b8275d7a1be108b8ad257d60f Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 11 Apr 2025 12:58:35 +0100 Subject: [PATCH] Add varify --- src/components/Analytics/Varify.astro | 8 +------- src/components/Analytics/analytics.ts | 1 + src/layouts/BaseLayout.astro | 14 ++++++++++++++ src/layouts/SkeletonLayout.astro | 7 +------ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/components/Analytics/Varify.astro b/src/components/Analytics/Varify.astro index ad8c1cf3e..8b1378917 100644 --- a/src/components/Analytics/Varify.astro +++ b/src/components/Analytics/Varify.astro @@ -1,7 +1 @@ - - - + diff --git a/src/components/Analytics/analytics.ts b/src/components/Analytics/analytics.ts index e283e4c56..ddbddae97 100644 --- a/src/components/Analytics/analytics.ts +++ b/src/components/Analytics/analytics.ts @@ -1,6 +1,7 @@ declare global { interface Window { gtag: any; + varify: any; fireEvent: (props: { action: string; category: string; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 98250b88e..8ae792d31 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -36,6 +36,7 @@ export interface Props { jsonLd?: Record[]; resourceId?: string; resourceType?: ResourceType; + hasVarify?: boolean; } const { @@ -52,6 +53,7 @@ const { initialLoadingMessage = '', resourceId, resourceType, + hasVarify = false, } = Astro.props; // Remove trailing slashes to consider the page as canonical @@ -152,6 +154,18 @@ const gaPageIdentifier = Astro.url.pathname + { + hasVarify && ( + + +