Measuring campaign performance and its impact on your bottom line is crucial for selecting effective conversion optimization strategies. OptiMonk's integration with Google Analytics provides precise data on orders and assisted revenue for your OptiMonk campaigns, regardless of the CMS your website runs on. Moreover, you can compare the performance of a campaign to running no campaigns at all.
In this article, we’ll show you
- Why should you integrate OptiMonk with Google Analytics
- What data is forwarded into Google Analytics
- How OptiMonk handles the transition from UA to GA4
- How to integrate OptiMonk with Google Analytics directly
- How to integrate OptiMonk with Google Analytics via Google Tag Manager
- How to set up Custom Definitions in GA4
- How to set up audiences in GA4
- How to use custom audiences for reporting in GA4
Why should you integrate OptiMonk and Google Analytics?
The integration with Google Analytics is useful as it helps you track essential business metrics beyond impressions and conversions, including:
- Performance of your Campaigns
- Order value
What data is forwarded into Google Analytics
You can track the following events in Google Analytics 4:
Event name: optimonk_campaign_event
- filled (referring to a conversion event)
- shown (referring to an impression a.k.a. your campaign has been shown)
- no (referring to a campaign that has been rejected by the visitor)
Please note that the name of the events in Universal Analytics have slightly been updated.
How OptiMonk handles the transition from UA to GA4
We distinguish between two cases: users who have directly installed Google Analytics and users who have installed it via Google Tag Manager.
If you’ve installed Google Analytics directly:
Good news! Events will be automatically sent to your new GA4 account without any additional configuration. You can immediately start benefiting from the integration. However, please note that your previous OptiMonk dashboard will not be transferred to Google Analytics 4. If you wish to create a new one, follow steps 7 and 8 in this article.
If you’ve installed Google Analytics via Google Tag Manager:
you’ll have to configure your events again. Please follow this simple guide to walk you through the process.
How to integrate OptiMonk with Google Analytics directly
As mentioned earlier, OptiMonk differentiates between two cases: users who have directly installed Google Analytics and users who have installed it via Google Tag Manager.
If you've installed Google Analytics directly:
OptiMonk automatically detects the Google Analytics code on your site and forwards campaign data. To ensure that OptiMonk has successfully detected the Google Analytics code and that the integration has been set up correctly, follow these simple steps:
- To get started, sign in to your OptiMonk account at https://app.optimonk.com/login/en
- Click on your icon in the bottom left corner and select Settings.
- Then select Domains under Settings. Here you’ll find all the domains that you’re running OptiMonk campaigns on. Click on any domain that you’d like to check the integration for. If it has been set up correctly, you should see the toggle set to active on the right.
How to integrate OptiMonk with Google Analytics via Google Tag Manager
Please follow this simple guide to walk you through the process.
How to set up Custom Definitions in GA4
Now that you have finished setting up your Google Tag Manager, it's time to configure your Google Analytics 4 account correctly.
1. Open Google Analytics 4, go to Settings, then find Custom definitions:
2. We recommend setting up the following three Custom definitions with their parameters:
- OptiMonk Campaign Action (om_campaign_action)
- OptiMonk Campaign Category (om_campaign_category)
- OptiMonk Campaign Name (om_campaign_name)
❗ After submitting this, you will need to wait up to 24 hours before continuing with the rest of the setup process. This time is necessary for GA4 to recognize all events (most settings in GA4 are not real-time, and have a delay of 1 to 24 hours).
How to set up audiences in GA4
The final step is to set up audiences based on the events. There will be two audiences:
- OptiMonk Shown: Users who have seen any OptiMonk campaign (at least 1 impression).
- OptiMonk Filled: Users who have filled out any OptiMonk campaign (at least 1 conversion).
Optionally, you can also set up audiences for actions such as "close(x)" (users who clicked on the closing X in a popup) and "no" (users who explicitly clicked on a "no thanks" or similar link in a popup).
1. Navigate to Settings in Google Analytics 4 and click on New audience.
2. In the Include Users dropdown find the “optimonk_campaign_event”:
3. Here chose “OptiMonk Campaign Action” in the parameter, and chose the “contains” parameter, and set it to “shown”.
4. You need to repeat the above process with the filled event:
Now you are all set! In 24 hours you’ll be able to use these audiences.
How to use custom audiences for reporting in GA4
After 24 hours have passed, you can go to any report and use these audiences for comparisons. For example.
1. Go to your selected report and click on Add comparison.
2. In the Build comparison menu chose Audience name as property:
3. Set it to OptiMonk Shown or OptiMonk Filled, based on what kind of comparison you want to do.
4. Here is what such a comparison will look like: