Integrate OptiMonk with Google Analytics via Google Tag Manager

This guide may be useful for you in case you installed Google Analytics via Google Tag Manager in order to measure the performance of your website. By following the instruction below, you will be able to monitor the performance of your campaigns within a special OptiMonk Dashboard for Google Analytics. 

You can set up OptiMonk to report the following events to your Google Tag Manager account: shown, filled, close(x), no.

Please follow the below steps to set up the reporting for your Google Tag Manager account:

1. First, log in to your OptiMonk account at

2. Click on your icon in the bottom left corner, select Settings then Domains:


3. Select the domain you want to set up, then click on Tag Manager Container under How to configure Google Tag Manager with OptiMonk, or open it here:


4. This will open a new browser window with the required information we need to import to Google Tag Manager. Click on the new browser window:


5. Right-click on that page, then select Save As.. and just simply save it as a JSON file:


6. Open Google Tag Manager in a new window, and log in to your account. Select the website you want to use:


7. Select Admin on the top menu then select Import Container to import the text file we have created previously:


8. Select Choose container file on the next page and select the JSON file you have downloaded previously and click Open:


9. Select your workspace where you would like to use the imported tags and variables.


10. Make sure that the import option is Merge with the following settings, then press Confirm:


11. If you did everything right you'll see the following changes on your workspace:


12. As the last step, you have to add your Google Analytics id. Open the "GA-OptiMonk event reporting" tag and paste your Google Analytics ID into the "Tracking ID" field, then save it. Generally, you'll find your Analytics ID in your Analytics tracking code (for example UA-80608409-1).


The following objects will be added to your data layer when the popup actions – shown, filled, close(x), no – are reported:

    'OptiMonk action': action,
    'OptiMonk label': label,
    'OptiMonk category': category,
    'event': 'OptiMonk ' + action


  • category: OptiMonk
  • action: shown, filled, close(x), no
  • label: OptiMonk campaign name
Have more questions? Submit a request