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 https://app.optimonk.com/login/en

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

mceclip0.png

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:

mceclip2.png

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:

mceclip4.png

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

Screenshot_at_Feb_10_15-39-30.png

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

mceclip10.png

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

mceclip11.png

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

mceclip0.png

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

mceclip1.png

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

mceclip2.png

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

mceclip4.png

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).

mceclip5.png

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
}; 

where

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

Comments