Introducing Dynamic Text Replacement for Personalized Marketing

All of your website visitors behave differently. That’s why at OptinMonster, we allow you to show targeted messages to visitors based on what page they’re viewing, where they’re coming from, how they are interacting with your campaigns, and more. Now we’re taking behavior personalization to a whole new level with Dynamic Text Replacement.

Dynamic Text Replacement (DTR) allows you to customize the text on your popups, welcome gates, slide-ins, floating bars, and other campaigns based on any external variable that you choose.

This allows you to automatically create customized messages targeted for each visitor.

You can tailor the text inside your campaigns to match your email automation sequences, pay-per-click (PPC) ads, and more.

Let’s take a look at some examples of OptinMonster Dynamic Text Replacement:

Here’s a customized up-sell popup that you can show to a subscriber visiting your site from an email automation campaign targeted specifically for them.

OptinMonster Dynamic Text Replacement Example 1

Here’s a customized call-to-action that you can show to your users inside your SaaS application or in your membership training website.

Dynamic Text Replacement Name Example

Here’s a customized email signup popup that you can automatically personalize for each product in your online store.

Dynamic Text Replacement Ecommerce

You can use Dynamic Text replacement to customize your campaigns based on user location, gender, age, and basically any other data that you have.

The possibilities here are literally endless.

OptinMonster Dynamic Text Replacement opens the door to a whole new level of personalization and customization for your onsite retargeting campaigns.

How Can You Use OptinMonster DTR?

Dynamic Text Replacement is available to all OptinMonster customers. Whether you’re on the Basic plan or the Pro plan, you have the ability to utilize our Dynamic Text Replacement API.

Implementing DTR in your OptinMonster campaign requires two things: a Merge Tag and a Custom Variable.

Merge Tags

A merge tag is what you add inside the OptinMonster builder to define dynamic text.

Here’s the merge tag format:


Here’s what an example merge tag will look like:


Or you can choose to have no fallback and just add:


Custom Variables

Custom variables are defined by you and are the data source for dynamic text replacement. You have to add the custom variables on your website on pages where you’re loading OptinMonster.

Note: You will need your web developers help on this.

Here’s what a custom variable code should look like:

<script type="text/javascript">
	var OptinMonsterCustomVariables = function(app) {
		app.setCustomVariable('name', 'Syed');

Basically as soon as the OptinMonster JS API loads on the page, it quickly previews the entire page source code to find a custom variable.

If it is available, OptinMonster will use the dynamic text to display in your popup. If not, then it will resort to the fallback that you defined in your merge tag.

For full implementation instructions, please refer to our Dynamic Text Replacement documentation.

What’s Coming Next?

With a completely new and powerful display rules engine in OptinMonster 3.0, content locking, and dynamic text replacement, our team is working hard to give you everything that you’ve been asking for.

Over the next few weeks, you should see new themes added for each campaign type. I will make an announcement at the end of the month about what we added, but we’re adding these on a weekly basis, so keep an eye out in your account.

We’ve been testing this Dynamic Text Replacement API internally for several months, so I’m super excited to see how everyone will utilize this. Please send us an email to show us how you’re utilizing this because that will help further develop and improve this API based on your needs.

Thanks for all your support and we look forward to helping you improve your conversions.

Syed and the OptinMonster Team

P.S. What are you waiting for? Turn your website into a lead generation machine with OptinMonster’s Dynamic Text Replacement. Get Started with OptinMonster Today!

Syed Balkhi
Syed Balkhi is the co-founder of OptinMonster. He was recognized as the top 100 entrepreneur under the age of 30 by the United Nations. He lives and breathes conversion marketing.


  1. Daniel Glickman says:

    your exit pop on this page is not personalized. Hugh! I say: just do it!

    1. Syed Balkhi Syed Balkhi says:

      We’re working on revamping our current site to bring it up to date with all the new features we have added in the last 4 weeks. That will include actually talking about the new features in How it Works page and other landing pages as well as utilizing the Y/N and DTR here.

  2. Quentin says:


    Great news! Another killer feature πŸ™‚
    As you ask for “What are your waiting for”, I will reply that what I’m waiting for is geolocalized popups to be able to display a popup to visitors from certain locations only. If you implement this feature, I’m Ok to sign for the next 10 years πŸ™‚

    1. Syed Balkhi Syed Balkhi says:

      That’s coming soon πŸ™‚

      1. Quentin says:

        and one another easy feature you can implement in your backend…a way to group the popups by websites, I have a lot of popups on many websites and I’m totally lost in the backend to find my popups.

  3. Eduardo says:

    I’m waiting for a new rule based on URL parameters πŸ™‚

    1. Syed Balkhi Syed Balkhi says:

      Yup that’s in our list to add πŸ™‚

  4. Alex says:

    1) GEOLocation popups = awesome!
    2) I’d love a how to based on all your stats on the best popup configuration to convert the most. I.e. best way to use all the popup options at our disposal for the best conversion rate.
    3) love this new feature!

  5. Matt says:

    These new features are great! My new feature request would be a logic-based funnel that would allow you to ask the customer a question on the popup, then based on the answer, either go to a URL or simply slide to another question which would then either redirect to a URL or slide into a third question.

    Good stuff OptinMonster!

    1. Angie Meeker says:

      Hi Matt,

      Thanks for sharing! You can do this using our Yes/No optins: If you have any other questions, please feel free to ask!

      1. Matt says:

        Hi Angie, thanks for pointing that out. My main point was having a form of slider within the popup so you could ask a series of yes/no questions within the same popup window.

        This would allow you to create a funnel which you could then redirect the user based on their answers to a page that was more focused on their answers.

  6. Matt says:

    Here’s another one – extend some logic into the display settings for each popup.

    For example, you have one popup that you’ve created but you want it to show up 7 seconds after loading on Mobile but you want it to be an exit pop on desktop.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.