Dynamic text

Dynamic text

Create dynamically changing messages based on first- and zero-party data.

Dynamic Text is an OptiMonk feature that automatically replaces parts of your popup or embedded content with real-time visitor data, such as the visitor's first name, country, current month, browser language, cart total, UTM source, or product name. Instead of creating separate campaigns for different visitor segments, you write one message and let Dynamic Text fill in the relevant detail for each person at display time. OptiMonk sources these values from three types of data: zero-party attributes that visitors submit through OptiMonk forms (such as their first name), first-party attributes collected automatically by OptiMonk (such as country name or cart total), and custom attributes passed from your own database via a JavaScript snippet on your site.

Key benefits

  • One campaign covers every visitor segment: A single popup greets registered users by name and falls back to a generic greeting for everyone else — eliminating the need to duplicate campaigns for different audience segments.
  • Over a dozen built-in data points, no code required on major platforms: OptiMonk automatically collects first-party attributes including country name, current month, browser language, cart total, cart item count, product name, and UTM parameters — available as Dynamic Text on Shopify, WooCommerce, Magento, WordPress, and Shoprenter without any custom code.
  • Extensible with custom attributes from any data source: If built-in variables do not cover your use case, you can define custom attributes via JavaScript and reference them using the [[attribute:variable_name|default]] placeholder format, connecting OptiMonk to any data in your own database or CRM.

How it works

Step 1
Click a text element and open the Dynamic Text menu

In the OptiMonk campaign editor, click on any text element in your popup or embedded content. A drop-down menu appears with all available Dynamic Text variables organized by category.

Step 2
Select a variable and set a default fallback value

Choose the attribute you want to insert — for example, "First name," "Country name," or "Current month." Set a fallback default that will display if the data is unavailable for a particular visitor.

Step 3
Save and publish — OptiMonk resolves each value at display time

When the popup fires for a visitor, OptiMonk reads the relevant data for that session and replaces the placeholder with the live value before the popup renders — no delayed loading or visible blank fields.

Frequently asked questions

What is Dynamic Text in OptiMonk?+

Dynamic Text is an OptiMonk feature that lets you insert personalized, visitor-specific data into popup and embedded content messages. Supported values include first name, country, current month, cart total, UTM parameters, product name, and more.

What visitor data can I use with Dynamic Text?+

OptiMonk supports three categories. Zero-party attributes are values visitors submit through OptiMonk forms, such as first name, email, or survey answers. First-party attributes are collected automatically by OptiMonk and include country name, browser language, current month, cart total, cart item count, product name, and UTM parameters. Custom attributes can be any value from your own database, passed to OptiMonk via a JavaScript snippet.

Does Dynamic Text require custom code?+

For zero-party and first-party attributes on Shopify, WooCommerce, Magento, WordPress, and Shoprenter, no custom code is required. Cart and product-related Dynamic Text on other platforms requires a custom JavaScript snippet. Custom attributes always require a JavaScript snippet.

What happens if the data is not available for a visitor?+

When inserting a Dynamic Text variable, you set a default fallback value. If OptiMonk cannot resolve the variable for a particular visitor — for example, because they are not logged in and no first name is on file — it displays the fallback text instead.

Can I use Dynamic Text for targeting rules as well as popup text?+

Dynamic Text is specifically for personalizing the visible text content within popups and embedded content. For targeting based on visitor attributes — such as showing a campaign only to visitors from a specific country or with a certain cart value — you would use OptiMonk's segmentation rules rather than Dynamic Text.

Ready to try it?

Try OptiMonk for free

Launch your first campaign, learn what works, then scale what converts.

ecommerce