Socket
Socket
Sign inDemoInstall

@vercel/analytics

Package Overview
Dependencies
1
Maintainers
9
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

dist/index.js
// package.json
var name = "@vercel/analytics";
var version = "1.1.0";
var version = "1.1.1";

@@ -5,0 +5,0 @@ // src/queue.ts

@@ -8,3 +8,3 @@ "use client";

var name = "@vercel/analytics";
var version = "1.1.0";
var version = "1.1.1";

@@ -11,0 +11,0 @@ // src/queue.ts

@@ -1,4 +0,1 @@

// src/server/index.ts
import "server-only";
// src/utils.ts

@@ -61,4 +58,13 @@ function isBrowser() {

var symbol = Symbol.for("@vercel/request-context");
var logPrefix = "[Vercel Web Analytics]";
async function track(eventName, properties, context) {
var _a;
if (typeof window !== "undefined") {
if (!isProduction()) {
throw new Error(
`${logPrefix} It seems like you imported the \`track\` function from \`@vercel/web-analytics/server\` in a browser environment. This function is only meant to be used in a server environment.`
);
}
return;
}
const props = parseProperties(properties, {

@@ -70,7 +76,7 @@ strip: isProduction()

console.log(
`[Vercel Web Analytics] Can't find VERCEL_URL in environment variables.`
`${logPrefix} Can't find VERCEL_URL in environment variables.`
);
} else if (!DISABLE_LOGS) {
console.log(
`[Vercel Web Analytics] Track "${eventName}" ${props ? `with data ${JSON.stringify(props)}` : ""}`
`${logPrefix} Track "${eventName}" ${props ? `with data ${JSON.stringify(props)}` : ""}`
);

@@ -77,0 +83,0 @@ }

{
"name": "@vercel/analytics",
"version": "1.1.0",
"version": "1.1.1",
"description": "Gain real-time traffic insights with Vercel Web Analytics",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc