OptinMonster is a popular lead generation and conversion optimization tool designed for websites. It helps website owners and marketers capture leads and boost conversions through a variety of tools and features.
With this Event Listener, you can track Optinmonster’s pop-up funnel interactions and send the events to Google Analytics 4, Mixpanel, Facebook, Google Ads, Twitter, etc.) using Google Tag Manager.
Simply copy the code into your Google Tag Manager with the necessary configuration and you are ready to begin collecting those events when they trigger.
How to track Optinmonster popup form interactions with Google Tag Manager
Optinmonster is one of the leading lead gen tools in the world, It is highly likely that you will encounter a website that uses Optinmonster in your daily analytics journey, hence it is very important to have this tracking skill under your belt.
You’ll need Google Tag Manager and the Optinmonster popup form event listener javascript code.
The code
- This script will listen for Optinmonster pop-up activity (impression, conversion, closing a pop-up, and errors) and push the event and its attributes to the dataLayer.
- Create dataLayer variables to collect the following:
- [campaignID]: the ID of the Optinmonster pop-up campaign
- [campaignName]: campaign name
- [campaignDetail]: returns campaign type, popup type
- Four events triggered by this listener
- [optinmonsterimpression]
- [optinmonsterconversion]
- [optinmonsterCampaignClose]
- [optinmonsterError]
- Create a custom event trigger for any of the four events above which will be used to fire your marketing tags and send data to platforms like Google Analytics 4, Facebook, Piwik Pro, etc.
- The event happens only on successful submission of HubSpot forms
- Trust But Verify (TBV). Test, test, and debug
- Publish once everything is okay.
Credit: dumbdata.co