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
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-deriv committed Nov 23, 2023
1 parent 17df29a commit 051d4d9
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

0 comments on commit 051d4d9

Please sign in to comment.