Mautic Community Forums

How to use Mautic Dynamic Web Content with anonymous contacts

I’be been trying to solve this for quite some time and I can’t get my head around it. I’m looking for a way to implement the flow in the chart below. In my blog, I’d like to show different promotional material (text-based ads) based on who visits the website. The first distinction I want to make is between anonymous and known contacts.

  • If the visitor is anonymous, I’d like to push to one set of pages.
  • if the visitor is known to Mautic, I’d like to show them other ads… and
    • if they’re already MQLs or higher, push them to other parts of the site

I tried implementing this with a campaign in Mautic but I don’t see a way to start a segment that includes anonymous contacts.

I tried to approach this from the wordpress Mautic plugin like in the sample below but the php code doesn’t get executed inside the [mautic] shortcode block. I’m not even sure that this approach makes sense: when does Mautic shortcode produce the default value anyway?

[mautic type="content" slot="solved_interstitial"]<?php echo adrotate_group(1); ?>[/mautic]

Do you have any suggestions? This is the basic flow I have in mind:

thank you

1 Like

I never tried but I think this is a pretty interesting possibility.
I will try an idea that came to mind after seeing your post and report back if it works.

Hi, I had the same issue and created a workaround by using non campaign based for anonymous and campaign based for known. I do agree that it should be possible to create a campaign for anonymous.


Yeah, @ninjoan’s idea is more or less what I had in mind:

Create a Segment an use the Filter > Email > Empty .
Sample if you would like to use DWC for anonymous visitors from USA use
Filter > Email > Empty
Filter > Country > USA

I guess you could also add some default value to each new contact created, or a value based on the visited page, downloaded item, chat visited, etc. and filter by that too.

1 Like

@smaffulli: not sure what you have in mind exactly, but if you really just want a segment to works with, “email=empty” is the no-brainer.

But I think I do understand @ascholten 's point: We do want to deliver DWC even on first hit.
Therefore “segment” is the wrong approach, because it can take a while until a user is in any segment.

created a workaround by using non campaign based for anonymous and campaign based for known.

Without having tried, this sounds like a solution to me. @ascholten can you share an example, maybe?

P.S. If you happen to use TYPO3 CMS with Mautic, there’s a deeper integration that lets you implement this logic directly (and natively, w/o JavaScript).

I use WP. I created two Dynamic content items. The first one is form based. It has a filter to only show the form when firstname and lastname are empty. In the content I introduce myself and kindly ask how they want to be addressed. First name or last name. When the formfield is filled this slot is closed. Next a new slot with Dynamic content is shown which is campaign based. In this campaign I gradually reveal the anonimity of the visitor by asking relevant information only when that information is needed (maybe more GDPR proof, anyway more in line with the experience of the visitor).
It would be better if this could be put in one campaign, but campaigns need a segment. And a segment with contacts that have an empty email address field. is not the same as an anonymous visitor. I already tried this. I added a DC slot that was campaign based. I used a segment with filter email is empty. The content was not show when viewing the site in an incognito browser.
So what is needed is an adjustment in the segment filter which seems to filter among contact, due to which anonimous viewers are missing.