In addition to fields, text blocks, HTML blocks, and images, you can set a dynamic item to populate a merge tag dynamically. This doc will go over how to set that up, and some examples of how to use it. Take a look at this doc if you want some general info on setting up a dynamic item.
To set a dynamic item to populate a merge tag, choose the Merge Tag option from the Target dropdown. You can change the merge tag to anything you like.
Merge tags can be used throughout the editor, including in text blocks, URL redirects, and in the ghost text for any field.
Here are a few examples of how you can use dynamic item merge tags.
Change One Word In A Text Block
If you want to change one word in a text block dynamically, rather than changing the whole block, you can add a merge tag to the text block wherever you’d like the word in question to change dynamically.
In this example, the [TOPIC] merge tag will get replaced with the value for the topic query parameter. Here’s what the dynamic item would look like:
In that dynamic item we’re taking any value for the topic URL parameter, and sending it to the [TOPIC] merge tag.
In the editor, we added the [TOPIC] merge tag to the text in Text 1
With this setup, if the URL were https://domain.com/?topic=marketing the lightbox would say “Thanks for joining our marketing newsletter”.
Redirect To An Anchor Point On The Current Page
In this example, we’re going to set a lightbox to redirect the user to an anchor point on the current page after they submit their info.
Here’s the dynamic item:
This DI will populate the [URL] merge tag with the current page’s URL. So, to redirect the user to an anchor point on that page, you’d set up either a button or the after form submit action like this:
With this setup, no matter what page the user is on when they submit this widget, they’ll be taken to the anchor point.
Change The Ghost Text In The Email Field
Let’s say your site operates in multiple different markets, each with a different primary language. You can change the ghost text for the email field with the following dynamic item:
This dynamic item looks for a meta tag that indicates the language of the current page is English, and fills the merge tag with the desired text.
In the editor, we put the [EMAILGHOSTTEXT] merge tag in the ghost text field in the editor for the email field.
If you have any questions about merge tags for dynamic items, send us an email and we’ll be glad to help you get your dynamic item up and running!