Google Analytics
MEG is integrated with google analytics 4 to capture events and user demographic parameters. An event can be a page view, scroll or button click. We currently don’t capture any custom events, although these can be configured if required. We do however capture custom parameters by default with every event.
Custom event parameters
Each event captured with google analytics will include the following custom parameters:
institution_name: The name of the institution
status: The status of the institution: active / free trial
institution_uid: The uid of the institution
institution_group: The name of the institution group, if it has a group
Adding a new custom event parameter
Update the megforms.context.analytics_context_processor() method to add a new custom event parameter.
Make sure the parameter you’re adding is broad enough to be useful within the context of analyzing the data.
For each custom event parameter, a corresponding custom dimension or metric must be defined in the google analytics admin panel. Follow the official guide for detailed instruction on how to configure custom event parameters.
Ensure your google_analytics_var<NUMBER> preserves the existing order of google_analytics_var variables.
Disabling Google analytics
To disable google analytics integration altogether, set GOOGLE_ANALYTICS_ENABLED to False.