diff --git a/doc/user/events/widget.rst b/doc/user/events/widget.rst index cc8fa7fecc..6e9e6ab337 100644 --- a/doc/user/events/widget.rst +++ b/doc/user/events/widget.rst @@ -304,8 +304,92 @@ Hosted or pretix Enterprise are active, you can pass the following fields: * If you use the campaigns plugin, you can pass a campaign ID as a value to ``data-campaign``. This way, all orders made through this widget will be counted towards this campaign. -* If you use the tracking plugin, you can pass a Google Analytics User ID to enable cross-domain tracking. This will - require you to dynamically load the widget, like this:: +* If you use the tracking plugin, you can enable cross-domain tracking. To do so, you need to initialize the + pretix-widget manually. Use the html code to embed the widget and add one the following code snippets. Make sure to + replace all occurrences of with your Google Analytics MEASUREMENT_ID (UA-XXXXXXX-X or G-XXXXXXXX) + + Please also make sure to add the embedding website to your `Referral exclusions + `_ in your Google Analytics settings. + + If you use Google Analytics 4 (GA4 – G-XXXXXXXX):: + + + + + If you use Universal Analytics with ``gtag.js`` (UA-XXXXXXX-X):: + + + + + If you use ```analytics.js` (Universal Analytics):: - In some combinations with Google Tag Manager, the widget does not load this way. In this case, try replacing - ``tracker.get('clientId')`` with ``ga.getAll()[0].get('clientId')``. - .. versionchanged:: 2.3