Skip to content

Commit

Permalink
Merge pull request #873 from navikt/feature/amplitude-disable-pageviews
Browse files Browse the repository at this point in the history
[amplitude] disable page viewed events
  • Loading branch information
dtkhiem authored Dec 6, 2024
2 parents 904af34 + 00b9c86 commit e6ca419
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
50 changes: 25 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@amplitude/analytics-browser": "^2.7.2",
"@amplitude/analytics-browser": "^2.11.9",
"@axe-core/react": "^4.9.1",
"@navikt/aksel-icons": "^6.16.3",
"@navikt/arbeidsplassen-css": "^8.2.17",
Expand Down
9 changes: 6 additions & 3 deletions src/app/_common/monitoring/amplitude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ export function initAmplitude(amplitudeToken: string | undefined) {

amplitude.init(amplitudeKey, undefined, {
serverUrl: `https://amplitude.nav.no/collect`,
defaultTracking: {
pageViews: true,
autocapture: {
attribution: true,
pageViews: false,
sessions: true,
formInteractions: true,
formInteractions: false,
fileDownloads: false,
elementInteractions: false,
},
/** Need this for /collect-auto according to https://nav-it.slack.com/archives/CMK1SCBP1/p1669722646425599
* but seems to work fine with /collect? Keeping it here just in case.
Expand Down

0 comments on commit e6ca419

Please sign in to comment.