Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
feat: add page tracking event (#6013)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-deriv authored Nov 24, 2023
1 parent 97383aa commit f530998
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit f530998

@vercel
Copy link

@vercel vercel bot commented on f530998 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com-git-master.binary.sx
deriv-com.binary.sx

Please sign in to comment.