@jwiedeman/gtm-kit-nuxt 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @jwiedeman/gtm-kit-nuxt
|
|
2
2
|
|
|
3
|
-
[](https://github.com/jwiedeman/GTM-Kit/actions/workflows/ci.yml)
|
|
4
|
+
[](https://codecov.io/gh/jwiedeman/GTM-Kit)
|
|
5
|
+
[](https://www.npmjs.com/package/@jwiedeman/gtm-kit-nuxt)
|
|
6
|
+
[](https://bundlephobia.com/package/@jwiedeman/gtm-kit-nuxt)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](https://nuxt.com/)
|
|
@@ -17,15 +17,15 @@ The Nuxt adapter for GTM Kit - native module with automatic page tracking and SS
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install @
|
|
20
|
+
npm install @jwiedeman/gtm-kit @jwiedeman/gtm-kit-nuxt
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
yarn add @
|
|
24
|
+
yarn add @jwiedeman/gtm-kit @jwiedeman/gtm-kit-nuxt
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
pnpm add @
|
|
28
|
+
pnpm add @jwiedeman/gtm-kit @jwiedeman/gtm-kit-nuxt
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
---
|
|
@@ -36,7 +36,7 @@ pnpm add @react-gtm-kit/core @react-gtm-kit/nuxt
|
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
38
|
// plugins/gtm.client.ts
|
|
39
|
-
import { GtmPlugin } from '@
|
|
39
|
+
import { GtmPlugin } from '@jwiedeman/gtm-kit-nuxt';
|
|
40
40
|
|
|
41
41
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
42
42
|
nuxtApp.vueApp.use(GtmPlugin, { containers: 'GTM-XXXXXX' });
|
|
@@ -47,7 +47,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
47
47
|
|
|
48
48
|
```vue
|
|
49
49
|
<script setup>
|
|
50
|
-
import { useGtm } from '@
|
|
50
|
+
import { useGtm } from '@jwiedeman/gtm-kit-vue';
|
|
51
51
|
|
|
52
52
|
const { push } = useGtm();
|
|
53
53
|
|
|
@@ -76,8 +76,8 @@ push({ event: 'page_view' });
|
|
|
76
76
|
|
|
77
77
|
```ts
|
|
78
78
|
// plugins/gtm.client.ts
|
|
79
|
-
import { GtmPlugin } from '@
|
|
80
|
-
import { consentPresets } from '@
|
|
79
|
+
import { GtmPlugin } from '@jwiedeman/gtm-kit-nuxt';
|
|
80
|
+
import { consentPresets } from '@jwiedeman/gtm-kit';
|
|
81
81
|
|
|
82
82
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
83
83
|
nuxtApp.vueApp.use(GtmPlugin, {
|
|
@@ -95,13 +95,13 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
95
95
|
|
|
96
96
|
## Available Composables
|
|
97
97
|
|
|
98
|
-
All composables from `@
|
|
98
|
+
All composables from `@jwiedeman/gtm-kit-vue` are available:
|
|
99
99
|
|
|
100
100
|
### `useGtm()`
|
|
101
101
|
|
|
102
102
|
```vue
|
|
103
103
|
<script setup>
|
|
104
|
-
import { useGtm } from '@
|
|
104
|
+
import { useGtm } from '@jwiedeman/gtm-kit-vue';
|
|
105
105
|
|
|
106
106
|
const { push, updateConsent } = useGtm();
|
|
107
107
|
</script>
|
|
@@ -111,7 +111,7 @@ const { push, updateConsent } = useGtm();
|
|
|
111
111
|
|
|
112
112
|
```vue
|
|
113
113
|
<script setup>
|
|
114
|
-
import { useGtmPush } from '@
|
|
114
|
+
import { useGtmPush } from '@jwiedeman/gtm-kit-vue';
|
|
115
115
|
|
|
116
116
|
const push = useGtmPush();
|
|
117
117
|
|
|
@@ -123,7 +123,7 @@ push({ event: 'purchase', value: 99.99 });
|
|
|
123
123
|
|
|
124
124
|
```vue
|
|
125
125
|
<script setup>
|
|
126
|
-
import { useGtmConsent } from '@
|
|
126
|
+
import { useGtmConsent } from '@jwiedeman/gtm-kit-vue';
|
|
127
127
|
|
|
128
128
|
const { updateConsent } = useGtmConsent();
|
|
129
129
|
</script>
|
|
@@ -139,7 +139,7 @@ If you need custom page tracking:
|
|
|
139
139
|
|
|
140
140
|
```vue
|
|
141
141
|
<script setup>
|
|
142
|
-
import { useGtm } from '@
|
|
142
|
+
import { useGtm } from '@jwiedeman/gtm-kit-vue';
|
|
143
143
|
import { useRoute } from 'vue-router';
|
|
144
144
|
import { watch } from 'vue';
|
|
145
145
|
|
|
@@ -167,8 +167,8 @@ watch(
|
|
|
167
167
|
|
|
168
168
|
```ts
|
|
169
169
|
// plugins/gtm.client.ts
|
|
170
|
-
import { GtmPlugin } from '@
|
|
171
|
-
import { consentPresets } from '@
|
|
170
|
+
import { GtmPlugin } from '@jwiedeman/gtm-kit-nuxt';
|
|
171
|
+
import { consentPresets } from '@jwiedeman/gtm-kit';
|
|
172
172
|
|
|
173
173
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
174
174
|
nuxtApp.vueApp.use(GtmPlugin, {
|
|
@@ -184,8 +184,8 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
184
184
|
```vue
|
|
185
185
|
<!-- components/CookieBanner.vue -->
|
|
186
186
|
<script setup>
|
|
187
|
-
import { useGtmConsent } from '@
|
|
188
|
-
import { consentPresets } from '@
|
|
187
|
+
import { useGtmConsent } from '@jwiedeman/gtm-kit-vue';
|
|
188
|
+
import { consentPresets } from '@jwiedeman/gtm-kit';
|
|
189
189
|
|
|
190
190
|
const { updateConsent } = useGtmConsent();
|
|
191
191
|
|
|
@@ -304,7 +304,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
304
304
|
|
|
305
305
|
- Nuxt 3.0+
|
|
306
306
|
- Vue 3.3+
|
|
307
|
-
- `@
|
|
307
|
+
- `@jwiedeman/gtm-kit` (peer dependency)
|
|
308
308
|
|
|
309
309
|
---
|
|
310
310
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jwiedeman/gtm-kit-nuxt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Nuxt 3 module for GTM Kit - Google Tag Manager integration with auto page tracking.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typecheck": "tsc --noEmit"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jwiedeman/gtm-kit": "^1.1.
|
|
45
|
-
"@jwiedeman/gtm-kit-vue": "^1.1.
|
|
44
|
+
"@jwiedeman/gtm-kit": "^1.1.4",
|
|
45
|
+
"@jwiedeman/gtm-kit-vue": "^1.1.4"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"nuxt": "^3.0.0",
|