Build Dynamic Content Into Your Blog

Recently, we added some dynamic content to the Mautic blog to allow us to serve up two different messages to visitors based on their behavior. For those who are not yet subscribed to our monthly newsletter, we display an email sign-up field; for those who are already subscribed to our newsletter, we display an ad promoting our customer Success Stories page.

For more context behind the decision to create this experience, read our blog post here. And to create a similar experience for your own blog, use these steps as a guide.

1. First, using HTML, create the area on your blog where you want the dynamic content to live.

Mautic Dynamic Content - creating the slot name


2. Create the content that will populate this area. You will need to create two pieces of content: default content and variable content. The default content in our experience is the newsletter signup form, and this will appear in the dynamic content space for everyone who does not meet the variant criteria. Our variant content, the Success Stories ad, will be shown to those who do meet the variant criteria. (Setting up that criteria is covered in the next step)
a. Newsletter Signup Form (our default content)
-Since our default content is a form, the dynamic content area should simply reference that form “{form=72}”.
-Set Is campaign based? to No to ensure that this gets served as the default content to all visitors.*
-Make sure the Requested Slot Name matches the name that you created in HTML in the first step.

Mautic Dynamic Content - Setting Up The Content

* Setting content as “campaign-based” means you will be using a Mautic campaign to identify if visitors meet the criteria and then serve up the corresponding content. Non-campaign-based dynamic content, on the other hand, does not require a campaign to execute. Instead, you apply filters directly within the dynamic content builder. Non-campaign based dynamic content can be created using multiple filters, or just one, as we have opted to do in this case. Because we want our default content to apply to everyone, we use a little trick of setting the filter to look for everyone who’s email doesn’t match this fake address. Another way to do it would be to set email as “not empty” meaning it will identify everyone who has an email address on file in the system.

Mautic Dynamic Content - Setting Content Filter

b. Success Stories ad (our variable content)
-Enter the desired content.*
-Set Is campaign based? to Yes because we will be creating a campaign to call on this content when certain criteria are met.


Mautic Dynamic Content - Success Stories Ad

*We used a little HTML to dress up the ad, applying H3 tags to the first line of text to make it look more like a true headline.

Mautic Dynamic Content Customization


3: Create the campaigns to control the variable content.
a. The first campaign will build a segment for everyone who submits their email to subscribe to the newsletter.
-Your starting segment(s) should include everyone you want to qualify for the default content. This could be your entire database (this is how we set ours up), or just a specific set of people.
Mautic Dynamic Content - Add to Segment Campaign
b. Using this newly created segment as the starting point, the second campaign will serve up the variable dynamic content.
Mautic Dynamic Content - Campaign to serve up Variable Content
-Here is the view of the Request Dynamic Content action. Be sure that the Requested Slot Name matches the dynamic content slot name and the area name you created in your blog’s HTML.

Mautic Dynamic Content - Request Dynamic Content Action









At this point, all of the necessary elements are in place. Simply publish each of the elements (the segment, the content, and the campaigns), and your dynamic content experience will be active.