From 051d4d9b54fc5a92d5c264874df77d2039bf0d44 Mon Sep 17 00:00:00 2001 From: amir ali Date: Thu, 23 Nov 2023 08:02:59 +0500 Subject: [PATCH] feat: add page tracking event --- gatsby-browser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index 40fe90cb7b0..8fac3d95c6f 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -138,7 +138,9 @@ export const onClientEntry = () => { updateURLAsPerUserLanguage() } -export const onRouteUpdate = () => { +export const onRouteUpdate = ({ location }) => { + Analytics.pageView(location.pathname, 'Deriv.com') + checkDomain() // can't be resolved by package function due the gatsby architecture window?._growthbook?.GrowthBook?.setURL(window.location.href)