Skip Navigation
Updated
October 5, 2022

The Popup Builder by OptinMonster plugin lets you create popup campaigns, email subscription forms, and other types of interactive popups. Using WPML, you can display different popup campaigns in different languages and connect your multilingual campaigns to different contact lists.

On This Page

Getting Started

Before starting, make sure you have the following plugins installed and activated on your site:

  • Popup Builder by OptinMonster (Depending on how you format your language URLs, a Pro plan may be necessary. We cover these cases in detail below.)
  • WPML core plugin and the WPML String Translation add-on

If you’re new to WPML, check out our Getting Started Guide. It quickly walks you through all the translation options you can use.

Creating Multilingual OptinMonster Campaigns with WPML

The OptinMonster plugin allows you to choose from 6 campaign types:

  • Popup
  • Floating Bar
  • Fullscreen
  • Inline
  • Slide-in
  • Gamified

If you have a WPML-powered website and want to run multilingual campaigns, you need to manually create the campaigns in your site’s default and secondary languages. 

OptinMonster then allows you to connect campaigns with multiple email service providers or different contact lists. When building the multilingual campaigns, you can then choose which email provider and contact list to connect each of the campaigns to.

With the OptinMonster plugin, you can also specify the posts or pages you want to display the campaigns on. However, the steps you need to take to show or hide your multilingual campaigns depends on the language URL format you select when setting up WPML.

You can only build multilingual campaigns using the basic version of the OptinMonster plugin if your URL format is set to “Different languages in directories”. For the remaining two URL format options, an OptinMonster Pro subscription or higher is required.

Building Multilingual Campaigns with the “Different Languages in Directories” URL Format

If the structure of your URL is set to Different languages in directories, you can show or hide multilingual campaigns by configuring the page targeting rules. 

To set the targeting rules for the campaign in your site’s default language:

  1. Go to OptinMonster → Campaigns and add or edit a campaign in your site’s default language.
  2. Click over to the Display Rules tab. From the Display Rules section on the bottom of the page, choose the Page Targeting option.
  3. Set the ruleset to If… current URL path does not start with es/. Make sure to replace the example URL, es/,  with your own language. If you have multiple secondary languages, add a new rule for each secondary language on your site in the same way.
Setting the ruleset for the campaign in the default language
  1. In the Integrations tab, select the email service provider and contact list to which you want to connect the campaign in your default language.
  2. Go through the remaining steps and Publish your campaign in OptinMonster. Then, exit the campaign builder. 
Publishing the campaign in OptinMonster and exiting the campaign builder
  1. You will be automatically taken to the WordPress Output Settings page, where you can set advanced targeting conditions. When you’re ready to complete the publishing process, locate the Visibility & Status section and change the Status to Published. Remember to click the Save Changes button.
Publishing the campaign on the WordPress Output Settings page

If your site has a number of secondary languages, you may not want to create all these rules manually. In this case, you can create them programmatically instead. You can choose to show or hide campaigns on your site using an advanced RegEx (Regular Expression) pattern matching approach

To set the page targeting rules for campaigns in your secondary languages:

  1. Go to the campaign design in your site’s secondary language. 
  2. Enter the Display Rules tab and select the Page Targeting option. Set  the ruleset as current URL path starts with es/. Make sure to replace the URL path, es/,  with your own secondary language. 
Setting the ruleset for the campaign in the secondary language
  1. In the Integrations tab, select the email service provider and contact list to which you want to connect the campaign in your secondary language.
Selecting the email provider and contact list for the secondary language campaign
  1. Go through the remaining steps and Publish your campaign in OptinMonster. Similarly as with the campaign in the default language, exit the campaign builder so you can publish the campaign on the WordPress Output Settings page.

Note: On the WordPress Output Settings page, you can set additional advanced display location rules for your campaign. For example, you can choose to show and/or exclude the campaign on individual posts or pages in your secondary language. For this to be possible, the selected posts and pages need to already be translated.

Setting additional advanced targeting conditions for the secondary language campaign

Building Multilingual Campaigns with the “Language Name Added as a Parameter” URL Format

For this workflow, an OptinMonster Pro or higher subscription is required.

If you format your language URLs as parameters, you can display multilingual OptinMonster campaigns by targeting campaigns to URLs with query arguments. 

To set the query arguments for campaigns in your site’s default language:

  1. Start by creating or editing a campaign in your site’s default language. In the Display Rules tab, click on Targeting and select the Query Targeting option.
Selecting the Query Targeting option
  1. Set the URL query arg to key does not exist. In the third field, enter the term lang.
Setting the query argument key for the default language
  1. Go through the remaining steps and Publish the campaign in OptinMonster. 
  2. Exit the campaign builder to be taken to the WordPress Output Settings page. To publish the campaign in WordPress, locate the Visibility & Status section and change the Status to Published. Don’t forget to click the Save Changes button.

To set the query arguments for campaigns created in your site’s secondary language:

  1. Create or edit a campaign in your site’s secondary language. In the Display Rules tab, click on Targeting and select the Query Targeting option.
  2. Set the query targeting to: If… the URL query arg key exactly matches lang and value contains es. Make sure to replace es with your secondary language code.
Setting the query argument key and value for the secondary language
  1. Go through the remaining steps and Publish the campaign in OptinMonster. 
  2. Exit the campaign builder to be automatically taken to the WordPress Output Settings page. Once you verify the output settings, find the Visibility & Status section and change the Status to Published. Remember to click on the Save Changes button.

Building Multilingual Campaigns with the “A Different Domain per Language” URL Format

If you have set your URLs in WPML to show as different domains per language, please note that you cannot configure multilingual campaigns on these sub-domains using the OptinMonster Popup Builder plugin. 

Instead, if you are using this URL format and want to build multilingual campaigns, you will need to configure each sub-domain as a different website directly from your OptinMonster account. You can then use sub-domain targeting to ensure that your campaign loads appropriately based on the language parameter in your sub-domain.  

Translating Inline Campaigns Added to a Post or Page Using the OptinMonster Block

Using the OptinMonster block, you can select and display any inline forms you create. Before following the steps below, make sure you already have inline campaigns created in both your site’s default and secondary languages. Then, log in to your OptinMonster account and copy the campaign ID for the form in your secondary language.

Copying the secondary language campaign ID from the OptinMonster account page

Now, add a new post or page, or edit an existing one:

  1. Add the OptinMonster block and select the inline campaign in your site’s default language from the list. Then, Publish the page.
Inserting the OptinMonster block and publishing the page
  1. From the Language box in the right sidebar, click the plus icon next to the language you want to translate the page into.
  2. You will be taken to the Advanced Translation Editor, where you can translate your page’s content. You should also see the ID of the default language form available for translation. Paste the campaign ID for the secondary language form as the translation.
Translating the campaign ID in the Advanced Translation Editor

Known Issues

There are no unresolved compatibility issues between this plugin and WPML. Search all known issues.