File tree 3 files changed +2
-6
lines changed
3 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @vercel/analytics" ,
3
- "version" : " 1.5.0-canary .1" ,
3
+ "version" : " 1.4 .1" ,
4
4
"description" : " Gain real-time traffic insights with Vercel Web Analytics" ,
5
5
"keywords" : [
6
6
" analytics" ,
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ export const DEV_SCRIPT_URL =
20
20
'https://va.vercel-scripts.com/v1/script.debug.js' ;
21
21
export const PROD_SCRIPT_URL = '/_vercel/insights/script.js' ;
22
22
23
- export const basepathVariableName = 'NEXT_PUBLIC_WEB_ANALYTICS_BASEPATH' ;
24
-
25
23
/**
26
24
* Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).
27
25
* @param [props] - Analytics options.
@@ -69,8 +67,6 @@ function inject(
69
67
}
70
68
if ( props . endpoint ) {
71
69
script . dataset . endpoint = props . endpoint ;
72
- } else if ( process . env [ basepathVariableName ] ) {
73
- script . dataset . endpoint = `/${ process . env [ basepathVariableName ] } /_vercel/insights` ;
74
70
}
75
71
if ( props . dsn ) {
76
72
script . dataset . dsn = props . dsn ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export function createComponent(
19
19
framework,
20
20
} ) ;
21
21
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route is undefined for barebone vue project.
22
- if ( route && window ) {
22
+ if ( route && typeof window !== 'undefined' ) {
23
23
const changeRoute = ( ) : void => {
24
24
pageview ( {
25
25
route : computeRoute ( route . path , route . params ) ,
You can’t perform that action at this time.
0 commit comments