@aranova/tracking-react 0.6.0 → 0.7.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
@@ -52,6 +52,32 @@ createRoot(document.getElementById('root')!).render(
52
52
  );
53
53
  ```
54
54
 
55
+ ### Multiple gtag IDs
56
+
57
+ To install multiple Google Ads tags simultaneously (for example a production MCC and a test MCC for verifying conversion actions before they touch the live account), pass `gtagIds` instead of `gtagId`. Every entry fires `gtag('config', ...)` on every page — gtag natively supports multiple configured tags.
58
+
59
+ ```tsx
60
+ <TrackingProvider
61
+ gtagIds={{
62
+ production: 'AW-111111111', // real client account
63
+ test: 'AW-222222222', // test MCC for development
64
+ }}
65
+ >
66
+ <App />
67
+ </TrackingProvider>
68
+ ```
69
+
70
+ The labels are arbitrary and surface in the Aranova dashboard's SDK versions table. You can also stamp events with a deployment environment so the dashboard can filter out test traffic:
71
+
72
+ ```ts
73
+ createTracking({
74
+ apiKey: import.meta.env.VITE_ARANOVA_TRACKING_API_KEY,
75
+ endpoint: import.meta.env.VITE_ARANOVA_TRACKING_ENDPOINT,
76
+ environment: import.meta.env.MODE, // 'production' | 'development'
77
+ triggers: { /* ... */ },
78
+ });
79
+ ```
80
+
55
81
  ## Manual Events
56
82
 
57
83
  Manual events must be registered under `triggers.manual` before `trackEvent()` accepts them.