Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/plugins/docusaurus-plugin-segment/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function getOneTrustConsentContext() {
}

export default ExecutionEnvironment.canUseDOM ? {
onRouteUpdate({ location }) {
onRouteUpdate() {
// Don't track page views on development
if (process.env.NODE_ENV === 'production' && window.analytics) {
window.analytics.page({
app: 'docs',
page_type: 'DOCS_PAGE',
path: location.pathname,
url: location.href,
search: location.search,
path: window.location.pathname,
url: window.location.href,
search: window.location.search,
...getOneTrustConsentContext(),
});
}
Expand Down