Comparing version
import * as _nuxt_schema from '@nuxt/schema'; | ||
import { GoogleTagOptions } from './runtime/types.ts'; | ||
import { GoogleTagOptions } from '../dist/runtime/types.js'; | ||
@@ -4,0 +4,0 @@ interface ModuleOptions { |
{ | ||
"name": "nuxt-gtag", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"configKey": "gtag", | ||
"compatibility": { | ||
"nuxt": "^3.7" | ||
"nuxt": ">=3.7" | ||
}, | ||
"builder": { | ||
"@nuxt/module-builder": "0.6.0", | ||
"@nuxt/module-builder": "0.8.1", | ||
"unbuild": "2.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { Gtag } from '../types'; | ||
import type { Gtag } from '../types.js'; | ||
export declare function useGtag(): { | ||
@@ -3,0 +3,0 @@ gtag: Gtag; |
@@ -1,2 +0,2 @@ | ||
import type { GtagCommands } from '../types'; | ||
import type { GtagCommands } from '../types.js'; | ||
export declare function useTrackEvent(...args: GtagCommands['event']): void; |
@@ -1,2 +0,2 @@ | ||
import type { GoogleTagOptions } from './types'; | ||
import type { GoogleTagOptions } from './types.js'; | ||
export declare function gtag(...args: any[]): void; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { ModuleOptions } from '../module'; | ||
import type { ModuleOptions } from '../module.js'; | ||
declare module '@nuxt/schema' { | ||
@@ -3,0 +3,0 @@ interface PublicRuntimeConfig { |
@@ -1,3 +0,3 @@ | ||
import type { ModuleOptions } from '../module'; | ||
import type { GoogleTagOptions } from './types'; | ||
import type { ModuleOptions } from '../module.js'; | ||
import type { GoogleTagOptions } from './types.js'; | ||
export declare function resolveTags(options: Required<ModuleOptions>): GoogleTagOptions[]; |
@@ -1,16 +0,1 @@ | ||
import type { ModuleOptions } from './module' | ||
declare module '@nuxt/schema' { | ||
interface NuxtConfig { ['gtag']?: Partial<ModuleOptions> } | ||
interface NuxtOptions { ['gtag']?: ModuleOptions } | ||
} | ||
declare module 'nuxt/schema' { | ||
interface NuxtConfig { ['gtag']?: Partial<ModuleOptions> } | ||
interface NuxtOptions { ['gtag']?: ModuleOptions } | ||
} | ||
export type { ModuleOptions, default } from './module' | ||
export { type ModuleOptions, default } from './module' |
{ | ||
"name": "nuxt-gtag", | ||
"type": "module", | ||
"version": "2.0.6", | ||
"packageManager": "pnpm@9.1.1", | ||
"version": "2.0.7", | ||
"packageManager": "pnpm@9.5.0", | ||
"description": "Natively integrates Google Tag into Nuxt", | ||
@@ -45,3 +45,3 @@ "author": "Johann Schopplich <hello@johannschopplich.com>", | ||
"dependencies": { | ||
"@nuxt/kit": "^3.11.2", | ||
"@nuxt/kit": "^3.12.3", | ||
"defu": "^6.1.4", | ||
@@ -52,11 +52,11 @@ "pathe": "^1.1.2", | ||
"devDependencies": { | ||
"@nuxt/eslint-config": "^0.3.12", | ||
"@nuxt/module-builder": "^0.6.0", | ||
"@nuxt/schema": "^3.11.2", | ||
"@types/node": "^20.12.11", | ||
"@nuxt/eslint-config": "^0.3.13", | ||
"@nuxt/module-builder": "^0.8.1", | ||
"@nuxt/schema": "^3.12.3", | ||
"@types/node": "^20.14.10", | ||
"bumpp": "^9.4.1", | ||
"eslint": "^9.2.0", | ||
"nuxt": "^3.11.2", | ||
"typescript": "^5.4.5" | ||
"eslint": "^9.6.0", | ||
"nuxt": "^3.12.3", | ||
"typescript": "^5.5.3" | ||
} | ||
} |
@@ -5,4 +5,2 @@  | ||
[](https://www.npmjs.com/package/nuxt-gtag) | ||
[Google Tag](https://developers.google.com/tag-platform/gtagjs?hl=en) integration for [Nuxt](https://nuxt.com) with support for [Google Analytics 4](https://developers.google.com/analytics/devguides/collection/ga4?hl=en), Google Ads and more. | ||
@@ -51,3 +49,4 @@ | ||
> 3. Click on your web data stream. | ||
> 4. Next, toggle the switch button near “Enhanced measurement”. | ||
> 4. Next, expand the switch button “Enhanced measurement”. | ||
> 5. Ensure the “Page changes based on browser history events” switch button is enabled. | ||
@@ -201,2 +200,4 @@ ## Configuration | ||
initialize('G-XXXXXXXXXX') | ||
// Optionally, track the current page view | ||
// useTrackEvent('page_view') | ||
} | ||
@@ -303,3 +304,7 @@ ``` | ||
// Load the `gtag.js` script and initialize all tag IDs from the module options | ||
initialize() | ||
function acceptTracking() { | ||
initialize() | ||
// Optionally, track the current page view | ||
// useTrackEvent('page_view') | ||
} | ||
``` | ||
@@ -306,0 +311,0 @@ |
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
401
1.26%31877
-1.02%457
-1.3%Updated