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

nuxt-gtag

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-gtag - npm Package Compare versions

Comparing version 2.0.7 to 2.1.0

2

dist/module.json
{
"name": "nuxt-gtag",
"version": "2.0.7",
"version": "2.1.0",
"configKey": "gtag",

@@ -5,0 +5,0 @@ "compatibility": {

import { withQuery } from "ufo";
import { gtag, initGtag } from "../gtag.js";
import { gtag, initGtag, resolveTags } from "../utils.js";
import { disableAnalytics as _disableAnalytics, enableAnalytics as _enableAnalytics } from "../analytics.js";
import { resolveTags } from "../utils.js";
import { useHead, useRuntimeConfig } from "#imports";

@@ -6,0 +5,0 @@ export function useGtag() {

import { withQuery } from "ufo";
import { defineNuxtPlugin } from "nuxt/app";
import { initGtag } from "./gtag.js";
import { resolveTags } from "./utils.js";
import { initGtag, resolveTags } from "./utils.js";
import { useHead, useRuntimeConfig } from "#imports";

@@ -6,0 +5,0 @@ export default defineNuxtPlugin({

import type { ModuleOptions } from '../module.js';
import type { GoogleTagOptions } from './types.js';
export declare function gtag(...args: any[]): void;
/**
* Initialize the Google tag.
*/
export declare function initGtag({ tags }: {
tags: GoogleTagOptions[];
}): void;
export declare function resolveTags(options: Required<ModuleOptions>): GoogleTagOptions[];
import { toRaw } from "#imports";
export function gtag(...args) {
window.dataLayer?.push(arguments);
}
export function initGtag({ tags }) {
window.dataLayer = window.dataLayer || [];
for (const tag of tags) {
for (const command of tag.initCommands ?? [])
gtag(...command);
}
gtag("js", /* @__PURE__ */ new Date());
for (const tag of tags) {
gtag("config", tag.id, tag.config ?? {});
}
}
export function resolveTags(options) {

@@ -3,0 +17,0 @@ const _options = toRaw(options);

{
"name": "nuxt-gtag",
"type": "module",
"version": "2.0.7",
"version": "2.1.0",
"packageManager": "pnpm@9.5.0",

@@ -6,0 +6,0 @@ "description": "Natively integrates Google Tag into Nuxt",

Sorry, the diff of this file is not supported yet

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