Skip to content

Commit

Permalink
set autocapture options to prevent warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kenglxn committed Nov 4, 2024
1 parent 92f0b2c commit a5f0c8a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions widget/brukerapi-mock/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 widget/brukerapi-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "git+https://github.com/navikt/arbeidsgiver-notifikasjon-widget.git"
},
"version": "7.1.3",
"version": "7.1.4",
"license": "MIT",
"main": "dist/notifikasjonMockMiddleware.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions widget/component/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 widget/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "git+https://github.com/navikt/arbeidsgiver-notifikasjon-widget.git"
},
"version": "7.1.3",
"version": "7.1.4",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions widget/component/src/utils/amplitude.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ const createAmpltiudeInstance = (apiKey: string): AmplitudeInstance => {
.init(apiKey, undefined, {
serverUrl: 'https://amplitude.nav.no/collect',
useBatch: false,
autocapture: {
attribution: true,
fileDownloads: false,
formInteractions: false,
pageViews: true,
sessions: true,
elementInteractions: false,
},
})
.promise.catch((error) => {
console.error('error initializing amplitude', error);
Expand Down

0 comments on commit a5f0c8a

Please sign in to comment.