Skip to content

Commit

Permalink
Merge pull request #71 from fingerprintjs/docs/update-deprecated-impo…
Browse files Browse the repository at this point in the history
…rt-in-readme-snippets

docs(README): replace deprecated imports in code examples INTER-630
  • Loading branch information
JuroUhlar authored May 21, 2024
2 parents 82f368c + 8c2a9b2 commit 49d11b7
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ import App from './App.vue';
import {
fpjsPlugin,
FpjsVueOptions,
// defaultEndpoint,
// defaultScriptUrlPattern,
FingerprintJSPro,
} from '@fingerprintjs/fingerprintjs-pro-vue-v3';

const app = createApp(App);
Expand All @@ -80,9 +79,15 @@ app
.use(fpjsPlugin, {
loadOptions: {
apiKey: '<your-public-api-key>',
endpoint: [
// "https://metrics.yourwebsite.com",
FingerprintJSPro.defaultEndpoint
],
scriptUrlPattern: [
// "https://metrics.yourwebsite.com/web/v<version>/<apiKey>/loader_v<loaderVersion>.js",
FingerprintJSPro.defaultScriptUrlPattern
],
// region: 'eu',
// endpoint: ['metrics.yourwebsite.com', defaultEndpoint],
// scriptUrlPattern: ['metrics.yourwebsite.com/agent-path', defaultScriptUrlPattern],
},
} as FpjsVueOptions)
.mount('#app');
Expand Down Expand Up @@ -231,8 +236,7 @@ import { defineNuxtPlugin, useRuntimeConfig } from '#app';
import {
fpjsPlugin,
FpjsVueOptions,
// defaultEndpoint,
// defaultScriptUrlPattern,
FingerprintJSPro,
} from '@fingerprintjs/fingerprintjs-pro-vue-v3';

export default defineNuxtPlugin((nuxtApp) => {
Expand All @@ -241,9 +245,15 @@ export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(fpjsPlugin, {
loadOptions: {
apiKey: config.public.API_KEY,
endpoint: [
// "https://metrics.yourwebsite.com",
FingerprintJSPro.defaultEndpoint
],
scriptUrlPattern: [
// "https://metrics.yourwebsite.com/web/v<version>/<apiKey>/loader_v<loaderVersion>.js",
FingerprintJSPro.defaultScriptUrlPattern
],
// region: 'eu',
// endpoint: ['metrics.yourwebsite.com', defaultEndpoint],
// scriptUrlPattern: ['metrics.yourwebsite.com/agent-path', defaultScriptUrlPattern],
},
} as FpjsVueOptions);
});
Expand Down

0 comments on commit 49d11b7

Please sign in to comment.