- 1. Getting Started
- 2. What's New
- 3. Dashboard
- 4. Contacts
- 5. Components
- 6. Channels
- 7. Campaigns
- 8. Reports
- 9. Points
- 10. Stages
- 11. Categories
- 12.1. Citrix Plugins
- 12.2. Clearbit
- 12.3. ConnectWise
- 12.4. FullContact
- 12.5. Gmail
- 12.6. Hubspot CRM
- 12.7. iContact
- 12.8. Mailchimp
- 12.9. Microsoft Dynamics CRM
- 12.10. Microsoft Outlook
- 12.11. Pipedrive
- 12.12. Salesforce CRM
- 12.13. Sugar CRM
- 12.14. Twitter
- 12.15. vTiger CRM
- 12.16. Zapier
- 12.17. Zoho CRM
- 12.18. Social login
- 12.19. Field Mapping
- 12.20. Integration Testing
- 13. Use Cases
- 14. Cron Jobs
- 15. SAML SSO
- 16. Search
- 17. Queue Support (RabbitMQ/Beanstalkd)
- 18. Themes
- 19. Translations
- 20. Tips & Tricks
- 21. Variables
- Published with GitBook
Dynamic Web Content
Mautic 2.0 introduced the ability to embed content on a web page dynamically for both anonymous visitors and known contacts.
There are 2 types of Dynamic Web Content items (or DWC):
This feature allows you to configure filters (like in segments) so a Landing Page with a DWC token or slot can show content based on specific conditions.
- Create or edit a Dynamic Web Content item.
- Toggle the "Is campaign based" button to No (Notice how when No is selected, the "Slot Name" field is available and the filters tab is displayed so new filters can be created.
- On a landing page, add a token or a slot for the new dynamic web content you just created.
- When using DWC slots, you need to provide the requested slot name.
- When someone visits the page and if the conditions on the filters are met, the DWC will be displayed.
- To add a DWC item with filters in a third party page, you can use the following code (just change
data-param-slot-name="myslot"to the Requested Slot Name of your DWC item):
<div data-slot="dwc" data-param-slot-name="myslot"> <h1>Dynamic web content for myslot</h1> </div>
- Again, when someone visits the page the DWC slot will be replaced if the filters match:
There are several steps involved in setting this up.
Add the default content
Add alternative content if desired
You can set up as many items as you need. The default will be delivered via the "Request Dynamic Content" decision in a campaign. If you want to push something different based on a set of criteria, you create those here and deliver them via a "Push Dynamic Content" action.
Add the dynamic content pull request in a campaign
The key to this step is naming the "slot". This can be anything you want as long as it's unique across your dynamic content campaigns. The pull request is processed and determines if the person on the landing page is a known contact.
Add the push request in the campaign
If you want to serve up different information based on certain criteria, you can use a push request.
- If the person is known, they receive the content from the pull request.
- If they meet the criteria (in the example below - if they are from Canada), a different set of content can be delivered to the browser.
- If they are unknown, they will see the information embedded in the dynamic web content div from the page (see below).
Finally, include the dynamic web content shortcode in your web page
<div data-slot="dwc" data-param-slot-name="dwc"> <h1>Dynamic web content for myslot</h1> </div>
Note the data-slot-name matches the slot name in the campaign.
Watch a video tutorial.
Dynamic web content supports translated content. When creating/editing a dynamic web content item, there are the options to set a language and select a translation parent. By selecting a translation parent, the current item is then considered to be a translation in the selected language of that parent item.
Dynamic web content supports these tokens:
- Contact Fields - example
- Page Link - example
- Asset Link - example
- Form - example
- Focus Item - example