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.
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.
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:
Go to OptinMonster → Campaigns and add or edit a campaign in your site’s default language.
Click over to the DisplayRules tab. From the Display Rules section on the bottom of the page, choose the PageTargeting option.
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
In the Integrations tab, select the email service provider and contact list to which you want to connect the campaign in your default language.
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
You will be automatically taken to the WordPressOutputSettings 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 SaveChanges 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:
Go to the campaign design in your site’s secondary language.
Enter the Display Rules tab and select the Page Targeting option. Set the ruleset as current URL pathstarts 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
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
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:
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
Set the URL query arg to keydoes not exist. In the third field, enter the term lang.
Setting the query argument key for the default language
Go through the remaining steps and Publish the campaign in OptinMonster.
Exit the campaign builder to be taken to the WordPressOutputSettings page. To publish the campaign in WordPress, locate the Visibility & Status section and change the Status to Published. Don’t forget to click the SaveChanges button.
To set the query arguments for campaigns created in your site’s secondary language:
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.
Setthe query targeting to: If… the URL query argkey exactly matcheslang 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
Go through the remaining steps and Publish the campaign in OptinMonster.
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 SaveChanges 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.
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:
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
From the Language box in the right sidebar, click the plus icon next to the language you want to translate the page into.
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.
Alternative Email Marketing Plugins
WPML is compatible with various other email marketing and lead generation WordPress plugins. Visit our Best Email Marketing & Lead Generation guide to learn more about our recommended solutions.