How to Integrate OptinMonster with Google Tag Manager

Adding OptinMonster to your site is easy, you can even use Google Tag Manager to implement our embed code.

In this article, you’ll learn how to embed OptinMonster on your site using Google Tag Manager.

Before You Start

  • Google Tag Manager is just one option for adding OptinMonster’s embed code to your site. We offer many platform-specific guides to help you get started quickly.

Configure Google Tag Manager

When you create a campaign in OptinMonster you’ll want to embed it on your website.

To embed your campaigns on your website using Google Tag Manager, follow these steps:

  1. Log into Google Tag Manager.
  2. From the Workspace screen, select Add New Tag to create a new Tag.
    Add a new GTM tag
  3. Add a title for your tag.
    Click Title Area to add Tag Title
  4. Next, select the Tag Configuration section to view the Tag Type menu. Scroll down and select Custom HTML.
    Account-wide select Custom HTML as tag type
  5. In a new browser tab, edit the campaign you want to embed and navigate to the Publish view. Choose the Any Website embed option and copy the account-wide embed code provided.
    Global embed code for OptinMonster can be found in the Publish screen of the campaign builder.
  6. Return to Google Tag Manager and paste the embed code into the Custom HTML field.
    Add the OptinMonster Embed Code to your Tag in Google Tag Manager.
  7. Expand the Advanced Settings section and select the Tag firing option you wish to use. In this example, we’ll fire the Tag once per page load.
    Fire tag in Google Tag Manager once per page.
  8. Select the Triggering section.
    Because you’re using the account-wide embed code we recommend you configure the Tag to fire on All Pages of your site and control where on your site the campaign appears through the campaign builder’s Display Rules.
    Account-wide select all pages for trigger
  9. After you review your setup, click Save on the top right to save your new tag.Account-wide save newly created tag
  10. You’ll now see the Tag you’ve created in the Workspace view of Google Tag Manager.
    Account-wide embed tag added
  11. Once you’ve created your Tag you can either Preview or Submit (Publish) it. To make this campaign live, go ahead and click Submit.
    Account-wide tag submit to publish
    New Tags added will indicate a new version of Google Tags loading on your site. To help track changes, you should add a version name, including what you changed. Specifically, you’ve added the account-wide OptinMonster embed code so you can mention that.
  12. When you’re finished, select Publish.
    Account-wide tag add notes to version and publish

Troubleshooting

I’ve added the OptinMonster embed code using Google Tag Manager but my site still shows as “Not Connected”.

Due to how Google Tag Manager includes our script you may need to manually verify the site.

To do this, add ?om-verify-site=true to the end of the URL to a specific page containing our embed code and you should see a green “Verified” badge appear for a moment in the lower left-hand corner of the browser window.

For example: https://optinmonster.com?om-verify-site=true

Your site should then show as “Connected”.

If you’re serious about jumpstarting your website growth, then get started with OptinMonster today!

Get Started With OptinMonster Today!

BONUS: Done-For-You Campaign Setup ($297 value)
Our conversion experts will design 1 free campaign for you to get maximum results – absolutely FREE! Click here to get started →