Skip to content

Commit

Permalink
add appDeployName in tracking path
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Feb 17, 2024
1 parent 6cd437b commit 3b5b4ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SetupGame from '@/views/SetupGame.vue'
import RoundTurn from '@/views/RoundTurn.vue'
import NotFound from '@/views/NotFound.vue'
import createRouter from 'brdgm-commons/src/util/router/createRouter'
import { name } from '@/../package.json'
import { name, appDeployName } from '@/../package.json'

declare let _paq: any; // eslint-disable-line @typescript-eslint/no-explicit-any

Expand Down Expand Up @@ -36,7 +36,7 @@ const routes: Array<RouteRecordRaw> = [
const router = createRouter(routes, LOCALSTORAGE_KEY, 'AppHome')
router.afterEach(to => {
if (_paq) {
_paq.push(['setCustomUrl', to.fullPath]);
_paq.push(['setCustomUrl', `/${appDeployName}${to.fullPath}`]);
_paq.push(['trackPageView']);
}
})
Expand Down

0 comments on commit 3b5b4ba

Please sign in to comment.