What is it for?

Dynamic Content Insertion lets you add personalized keywords and information to pages to make your ads and marketing campaigns more relevant. 

Generally, you have three options:

  • manually add query string parameters to the URL
  • dynamically pass query string parameters through the URL
  • use JavaScript to pass on data provided by Unless

In this guide, we'll teach you how to dynamically pass values onto the page using query string parameters. To illustrate, we'll create an email campaign but you could also pass information from AdWords, your CRM, or custom queries.  

This is a guide for advanced users. To learn the basics, take a look at this guide and later move on to the expert guide

Dynamically add query string parameters to the URL

For this guide, we'll create an email campaign using Mailchimp and inject information about an email recipient into the landing page.
Remember that each email service is different, so make sure you're using the correct identifiers (usually referred to as "merge tags").  

What's a merge tag? 

The information you collect through your email signup form (or upload any other way to your email service) is saved in a list field and tied to a unique label called a merge tag. Merge tags allow you to dynamically add content to your email, e.g. the recipient's name. With Unless, you can use those merge tags to dynamically send information to your landing page.

Popular email services and their merge tags:

  • MailChimp's merge tags: *|TAG|* (e.g. *|FIRSTNAME|*)
  • ActiveCampaign's merge tags: %TAG% (e.g. %FIRSTNAME%)
  • Drip's merge tags: {{ tag }} (e.g. {{ firstname }}

Step-by-Step Guide: 

1. Add a dynamic placeholder to your page:
For this example, we added the dynamic placeholder {{firstname}} to the page and used "there" as a fallback variable (in case we don't have everyone's name in the database). This placeholder will later be replaced with the name of the email recipient (or the fallback). 

2. Add the query string to the URL:
Add the Dynamic Parameter (?dynamic_parameter) and a value (=value) to your URL.
In our case, the parameter is {{firstname}} and the value equals the corresponding merge tag of our mail service.

Your URL will look something like this:
Mailchimp: https://mywebsite.com/?firstname=*|FNAME|*
ActiveCampaign: https://mywebsite.com/?firstname=%FIRSTNAME%
Drip: https://mywebsite.com/?firstname={{ firstname }}

If you're using the script-free setup, your URL will look something like:
Mailchimp: https://unless.com/xxxxx?firstname= *|FNAME|*
ActiveCampaign: https://unless.com/xxxxx?firstname=%FIRSTNAME%
Drip: https://unless.com/xxxxx?firstname={{ firstname }}

3. Use the link in your email campaign.

Through the URL, the email service will now sent information from their database to the page.

Here's our example; after clicking on the link, the page opens and the {{firstname}} parameter is replaced with the first name of the email recipient.  

So far, you've learned the basics of DCI and how to inject a value from a 3rd party onto your page. You can also use so-called Unless properties to dynamically change the content of a page. This is particularly useful if you want to make a lot of small changes, for example show different headlines based on time of day. To learn more, head over to our expert guide. 

Did this answer your question?