Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 711645c

Browse files
author
Matteo Gabriele
committed
fix(page): change transformRouteParams to transformQueryString
the name is not correct, this property affects the creation of a querystring in the path name from a given query object in the router
1 parent 7453ace commit 711645c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const defaultConfig = {
1212
autoTracking: {
1313
exception: false,
1414
page: true,
15-
transformRouteParams: true,
15+
transformQueryString: true,
1616
pageviewOnLoad: true,
1717
pageviewTemplate: null,
1818
untracked: true

src/lib/page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { noop, getQueryString, isRouteIgnored } from '../helpers'
55

66
export default function page (...args) {
77
if (typeof args[0] !== 'string' && 'currentRoute' in args[0]) {
8-
const { transformRouteParams } = config.autoTracking
8+
const { transformQueryString } = config.autoTracking
99
const route = args[0].currentRoute
1010
const queryString = getQueryString(route.query)
11-
const path = route.path + (transformRouteParams ? queryString : '')
11+
const path = route.path + (transformQueryString ? queryString : '')
1212

1313
set('page', path)
1414
query('send', 'pageview', {

0 commit comments

Comments
 (0)