@walkeros/web-destination-gtag 0.4.2 → 0.5.1-next.0
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 +49 -14
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.js +11 -11
- package/dist/examples/index.mjs +11 -11
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,26 +25,52 @@ single destination configuration.
|
|
|
25
25
|
npm install @walkeros/web-destination-gtag
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
Configure in your Flow JSON:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"version": 1,
|
|
35
|
+
"flows": {
|
|
36
|
+
"default": {
|
|
37
|
+
"web": {},
|
|
38
|
+
"destinations": {
|
|
39
|
+
"gtag": {
|
|
40
|
+
"package": "@walkeros/web-destination-gtag",
|
|
41
|
+
"config": {
|
|
42
|
+
"settings": {
|
|
43
|
+
"ga4": { "measurementId": "G-XXXXXXXXXX" },
|
|
44
|
+
"ads": { "conversionId": "AW-XXXXXXXXX" },
|
|
45
|
+
"gtm": { "containerId": "GTM-XXXXXXX" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Or programmatically:
|
|
29
56
|
|
|
30
57
|
```typescript
|
|
31
58
|
import { startFlow } from '@walkeros/collector';
|
|
32
59
|
import { destinationGtag } from '@walkeros/web-destination-gtag';
|
|
33
60
|
|
|
34
|
-
const { elb } = await startFlow(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
containerId: 'GTM-XXXXXXX', // Required for GTM
|
|
61
|
+
const { elb } = await startFlow({
|
|
62
|
+
destinations: [
|
|
63
|
+
{
|
|
64
|
+
destination: destinationGtag,
|
|
65
|
+
config: {
|
|
66
|
+
settings: {
|
|
67
|
+
ga4: { measurementId: 'G-XXXXXXXXXX' },
|
|
68
|
+
ads: { conversionId: 'AW-XXXXXXXXX' },
|
|
69
|
+
gtm: { containerId: 'GTM-XXXXXXX' },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
46
72
|
},
|
|
47
|
-
|
|
73
|
+
],
|
|
48
74
|
});
|
|
49
75
|
```
|
|
50
76
|
|
|
@@ -267,6 +293,15 @@ const rules: DestinationGtag.Rules = {
|
|
|
267
293
|
- Check the dataLayer name matches your GTM configuration
|
|
268
294
|
- Use GTM Preview mode to debug event flow
|
|
269
295
|
|
|
296
|
+
## Type Definitions
|
|
297
|
+
|
|
298
|
+
See [src/types/](./src/types/) for TypeScript interfaces.
|
|
299
|
+
|
|
300
|
+
## Related
|
|
301
|
+
|
|
302
|
+
- [Website Documentation](https://www.walkeros.io/docs/destinations/web/gtag/)
|
|
303
|
+
- [Destination Interface](../../../core/src/types/destination.ts)
|
|
304
|
+
|
|
270
305
|
## Contribute
|
|
271
306
|
|
|
272
307
|
Feel free to contribute by submitting an
|