Mautic Community Forums

How can I create a segment for anonymous

Hi,

Is it possible to create a segment for anonymous. I want to setup a campaign for anonymous visitors, but a campaign always has to start with a segment. Furthermore a trigger is needed to add a visitor to a segment.
My aim is to provide Dynamic Web Content to anonymous visitors, where different content is shown the next time an anonymous visitor visits the site.

Now I am using a formpage where a contact is added to a segment after filling out a form. The trouble is that this page is not dynamic and will not go away after the form is filled out. As a workaround I do a forward to a DWC page, but this way I can’t use the formpage as a firstpage / “landingpage”.

I use Mautic 2.15.1 and Wordpress

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

2 Likes

Thanx Ninjoan,

I tried that. The problem is that segment only gets filled with anonymous contacts that are already in the database. New anonymous visitors are not added to the segment.
I quess that mautic is setup in a way to do a campaign for a predefined group (batch mode) or on a one by one bases (form based).

Do you have the cron set up? You will need to add the mautic:segement:update to cron: https://www.mautic.org/docs/en/setup/cron_jobs.html

Yes I have set it up. But you’re missing the point. I want live visitors that visit the site for the first time to see a form. When the form is filled out it should be replaced by the second DWC in the campaign. That means I can’t wait for a cron job to finish.

So what I’m working on now is to create a campaign form and put it in a DWC with a filtering that says to show only to contact where the formfield is empty

This DWC is added to a page
In the same page a second DWC is added requesting the slot in the campaign.

It’s not finished yet.

I expected that the default content that is setup in the content request in the campaign builder would be shown to all visitors, but it is shown to the segment. And the segment is not live updated by new visitors. This only seems to happen over cron job or save