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.
- Getting Started
- Creating Multilingual OptinMonster Campaigns with WPML
- Building Multilingual Campaigns with the “Different Languages in Directories” URL Format
- Building Multilingual Campaigns with the “Language Name Added as a Parameter” URL Format
- Building Multilingual Campaigns with the “A Different Domain per Language” URL Format
- Translating Inline Campaigns Added to a Post or Page Using the OptinMonster Block
- Known Issues
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.
The OptinMonster plugin allows you to choose from 6 campaign types:
- Floating Bar
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.
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 Display Rules tab. From the Display Rules section on the bottom of the page, choose the Page Targeting 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.
- 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.
- 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.
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 path starts with es/. Make sure to replace the URL path, es/, with your own 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.
- 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.
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.
- Set the URL query arg to key does not exist. In the third field, enter the term lang.
- Go through the remaining steps and Publish the campaign in OptinMonster.
- 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:
- 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.
- 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.
- 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 Save Changes button.
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.
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.
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.
- 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.