Tracking Qonfi events in GA4 (Google Analytics 4) manually
Note: this documentation can be used if you don't want to see GA4 data in Qonfi but still want to see Qonfi data in GA4.
Please visit this page if you want to automatically connect Qonfi with GA4 and Google Tag Manager.
Setting up Google Tag Manager (GTM)
We'll be using GTM to pick-up events from Qonfi and send them to GA4.
Step 1: Create a Trigger
Create a new Trigger in GTM, select Custom Event as the trigger type and use qonfi_interaction as the Event name.
Step 2: Create the required variables
Create the following variables in GTM:
| Name | Type |
| qonfi_question | Data Layer Variable |
| qonfi_answer | Data Layer Variable |
| qonfi_is_start | Data Layer Variable |
| qonfi_is_finish | Data Layer Variable |
| qonfi_is_click_through | Data Layer Variable |
| qonfi_id | Data Layer Variable |
| qonfi_name | Data Layer Variable |
Step 3: Create the tag
Create a tag using the Google Analytics: GA4 Event type. Use qonfi_interaction as the Event Name and add all the previously created variables under Event Parameters.
Next, add the qonfi_last_id property to User properties and use the qonfi_id variable as the value.
Add the Trigger created in Step 1 as the trigger for this tag. Give your tag a name and save the tag.
Step 4: Publish and test your configuration
Preview and test your changes in Google Tag Manager. Once all events are correctly firing you can publish your changes. Once published, your Qonfi events will start flowing into GA4.
Step 5: Creating custom dimensions in GA4
To use the event parameters in your GA4 reports, you'll need add these parameters to your custom dimensions.
In GA4 go to Settings -> Custom Definitions and click on Create custom dimensions. Add the following 5 custom dimensions, including the corresponding dimension name and event parameter.
Choose Event as the scope for all dimensions. Select the correct Qonfi parameter from the Event parameter drop-down. Repeat this for every Qonfi parameter you want to use in your reports.
| Dimension name | Event parameter | Scope |
| qonfi_question | qonfi_question | Event |
| qonfi_answer | qonfi_answer | Event |
| qonfi_is_start | qonfi_is_start | Event |
| qonfi_is_finish | qonfi_is_finish | Event |
| qonfi_is_click_through | qonfi_is_click_through | Event |
| qonfi_id | qonfi_id | Event |
| qonfi_name | qonfi_name | Event |
| qonfi_last_id | qonfi_last_id | User |
Please note that it could take up to a day, before the Qonfi event parameters show up in the Event parameter drop-down in GA4, after the first Qonfi event is fired on your website for the first time.
Analyzing performance and user behavior
Once your Qonfi events are tracked in GA4, you can start analyzing the impact of Qonfi.
Tracking advised and clicked-through products in GA4
To track advised and clicked-through products in GA4, we'll be using the default view_item_list and select_item e-commerce events from GA4.
Adding the required tags and triggers
To start tracking the GA4 events, we need to make sure the view_item_list and select_item events are correctly captured in GTM. In many case this might already be configured in your GTM container, since these are the same events used to track product events on your website outside of Qonfi. But in case these events are not captured yet, you can follow these steps:
1. Add the view_item_list tag and trigger
Configure the tag (make sure that the "Send Ecommerce Data" checkbox is checked):
And the trigger:
2. Do the same for the select_item event
Debugging
Once the tags and triggers are configured, we can Preview the configuration in GTM. If everything is correctly configured, and we open the DebugView in GA4, we can see that the view_item_list event is firing whenever a user sees a Qonfi product advice and that the select_item event is fired whenever a user clicks on a product in a Qonfi product advice.
Heads-up: Do not forget to publish your changes in GTM.
Documentation