@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 CHANGED
@@ -25,26 +25,52 @@ single destination configuration.
25
25
  npm install @walkeros/web-destination-gtag
26
26
  ```
27
27
 
28
- ## Usage
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
- elb('walker destination', destinationGtag, {
37
- settings: {
38
- ga4: {
39
- measurementId: 'G-XXXXXXXXXX', // Required for GA4
40
- },
41
- ads: {
42
- conversionId: 'AW-XXXXXXXXX', // Required for Google Ads
43
- },
44
- gtm: {
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