Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-umami

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-umami - npm Package Compare versions

Comparing version 2.1.5 to 2.2.0

1

internal/debug.ts

@@ -19,2 +19,3 @@ import type { PreflightResult } from './types';

'err-collect': { level: 'error', text: 'Uh... Something went wrong and I have no clue.' },
'err-v2': { level: 'warn', text: 'Oops, this module is not compatible with Umami v2 Cloud' },
};

@@ -21,0 +22,0 @@

2

internal/types.ts

@@ -24,3 +24,3 @@ interface BasicPayload {

type PayloadType = 'pageview' | 'event';
type PreflightResult = 'ssr' | 'id' | 'host' | 'domain' | 'dnt' | 'local' | true;
type PreflightResult = 'ssr' | 'id' | 'host' | 'domain' | 'dnt' | 'local' | 'v2' | true;

@@ -27,0 +27,0 @@ interface ServerPayload {

@@ -72,5 +72,5 @@ import type {

const endpoint = computed(() => {
const { host, customEndpoint, version } = umConfig.value;
const { host, customEndpoint } = umConfig.value;
const root = new URL(host);
const branch = customEndpoint || (version === 2 ? '/api/send' : '/api/collect');
const branch = customEndpoint || '/api/collect';

@@ -85,3 +85,3 @@ return `${root.protocol}//${root.host}${branch}`;

const { ignoreDnt, id, host, ignoreLocal } = umConfig.value;
const { ignoreDnt, id, host, ignoreLocal, version } = umConfig.value;

@@ -96,2 +96,6 @@ if (!isValidString(id)) {

if (version === 2) {
return 'v2';
}
const {

@@ -98,0 +102,0 @@ location: { hostname },

@@ -31,3 +31,3 @@ export default defineNuxtConfig({

*/
host: string
host?: string
/**

@@ -39,3 +39,3 @@ * Unique identifier provided by Umami

*/
id: string
id?: string
/**

@@ -74,2 +74,3 @@ * Configure the tracker to only run on specific domains.

*
* @deprecated Nuxt Umami does not support Umami v2 (Cloud)
* @default 1

@@ -76,0 +77,0 @@ */

{
"name": "nuxt-umami",
"type": "module",
"version": "2.1.5",
"version": "2.2.0",
"description": "Integrate Umami Analytics into Nuxt",

@@ -6,0 +6,0 @@ "author": "ML <me.mlaure@gmail.com>",

@@ -117,3 +117,2 @@ # Nuxt Umami <sup>@next<sup>

| customEndpoint | `string` | Set a custom `COLLECT_API_ENDPOINT`. See [Docs](https://umami.is/docs/environment-variables). | no | `undefined`
| version | `1 \| 2` | Umami version (Cloud) | no | `1` |

@@ -140,10 +139,12 @@ ## Usage

Umami v2's release is on the horizon, and they currently offer a [free beta plan](https://umami.is/pricing) for Umami Cloud. To use v2 (or Cloud), set `version: 2` in the Umami config.
~~Umami v2's release is on the horizon, and they currently offer a [free beta plan](https://umami.is/pricing) for Umami Cloud. To use v2 (or Cloud), set `version: 2` in the Umami config.~~
> **Warning**:
> v2 is still WIP pending official release and the new docs. Test rigorously, and if you encounter bugs/issues, please open an issue.
Nuxt Umami v2 is not compatible with Umami (v2) Cloud. You can try [Nuxt Umami v1](https://github.com/ijkml/nuxt-umami/tree/main).
> **Note**:
> At this point, I do not have any plans to support Umami v2 Cloud (not until the official release and the new docs at least). But if you want to help, reach out.
## Issues, Bugs, Ideas?
Open an issue, fire a PR. Contributions are welcome! If you encounter any issues, don't hesitate to open an issue. I'm always available to help and resolve any bugs.
Open an issue. Contributions are welcome, just send a PR! If you encounter any issues, don't hesitate to open an issue. I'm always available to help and resolve any bugs.

@@ -150,0 +151,0 @@ ## Contributors

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc