@affiliateo/web 4.2.0 → 4.3.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/dist/provider.js +10 -0
- package/package.json +1 -1
package/dist/provider.js
CHANGED
|
@@ -339,6 +339,12 @@ export function AffiliateoProvider({ campaignId, apiUrl, allowedHostnames, allow
|
|
|
339
339
|
utm_source: params.get('utm_source') || '',
|
|
340
340
|
utm_medium: params.get('utm_medium') || '',
|
|
341
341
|
utm_campaign: params.get('utm_campaign') || '',
|
|
342
|
+
// Ad-network click ids — set automatically on the landing URL by
|
|
343
|
+
// every Meta/TikTok/Google ad click. Label the sale's source and
|
|
344
|
+
// feed server-side conversion matching.
|
|
345
|
+
fbclid: params.get('fbclid') || '',
|
|
346
|
+
ttclid: params.get('ttclid') || '',
|
|
347
|
+
gclid: params.get('gclid') || '',
|
|
342
348
|
screen_width: window.innerWidth,
|
|
343
349
|
};
|
|
344
350
|
queueRef.current?.enqueue(`${apiBase}/api/v1/web/event`, payload);
|
|
@@ -666,6 +672,10 @@ export function AffiliateoProvider({ campaignId, apiUrl, allowedHostnames, allow
|
|
|
666
672
|
utm_source: params.get('utm_source') || '',
|
|
667
673
|
utm_medium: params.get('utm_medium') || '',
|
|
668
674
|
utm_campaign: params.get('utm_campaign') || '',
|
|
675
|
+
// Ad-network click ids from the landing URL (see trackPageview).
|
|
676
|
+
fbclid: params.get('fbclid') || '',
|
|
677
|
+
ttclid: params.get('ttclid') || '',
|
|
678
|
+
gclid: params.get('gclid') || '',
|
|
669
679
|
screen_width: window.innerWidth,
|
|
670
680
|
});
|
|
671
681
|
log('pageview', { path: window.location.pathname });
|