Campaign Decision Question

Hello

I want to send a mail according the user’s language.
So I created a campaign with a decision if the user visited the English site i.e. website.com/en/*.
The green path sends the English mail.
The red path sends the German mail.

Unfortunately the campaign sends only the English email also for visitors coming from website.com

What’s wrong with the decision?

Kind regards

Christian

Your software
My Mautic version is: 5.0.3
My PHP version is: 8.1
My Database type and version is: Ver 15.1 Distrib 10.11.6-MariaDB

It depends on the details of your setup. Where and how do you check the referring page for each user? Do you store it in a user field (e.g. preferred locale)? How do you check this parameter in your campaign? Did you setup your mails locale?

Actually - if you use the mail feature, that allows you to connect the translations of a mail, you don’t need a green and red path - only one. It requires you set the locale of the user correctly. One language is default for each user without defined locale.

I

It looks like this. The locale is not set (yet), that’s why I’m making the decision via visiting the /en/* page tree i.e. green path: If the user comes from a page with the url website.com/en/* the English mail is sent. For all others, the German mail.

But it’s not working.

But don’t you have a form where you capture the interest of the visitor? So they are using one or the other form? Decisions based on visit of a page (tracked by tracking script) is not very reliable, as people may block the tracking script…

Not yet. It is a simple registration form: Gender, Name, Surnam, Phone and email.
Based on, if the visitor looked at the EN site the url is different, then DE. This was my logic.
Maybe I should ad the locale also.

Having two forms, an English one and a German one, isn’t it possible to distinguish the email sent via the form id? I.e. If the user submits form ID 14 then the campaign sends out the German mail and for ID 15 the English one.

So are both EN and DE pages loading the form? How will you find out where the contact came from? The screenshot is not explaining enough :wink:

The form starts the campaign?
“English speaking user” is the visit condition?
Why should someone, who just submitted the form, visit the page?

The campaign will start listening for page visits, as soon as its started. If the contact has a script blocker, you won’t get the event of the page view anyway.

You could add the preferred_local for the client as a hidden field in the form, linked to the contact field.

There was also an update to be able to read the preferred locale from the user’s browser. If you go to Custom Fields and set the Preferred Locale field as publicly updatable, there’s no other action you need to take. Mautic will recognize the locale from the browser, and if you have the translation created properly on the email you’ll be able to use just one email in the campaign.

The Mautic documentation on translations seems to be a bit lacking, but here’s what I could find:

https://docs.mautic.org/en/5.x/channels/emails.html#translations

Forms can’t be translated (unless that’s an update in 5.x), but you could use dynamic web content on your page to show one form if the preferred locale is English and a different form for German (you can use any other languages too, of course).

Hope that helps!

Actually the translation of forms (and some messages) is the missing piece for real multi language support. A partner even created a proxy script, that loads the form with replaced strings. Would love to have it within Mautic, as most SME B2B companies in our region have at least a bilingual website.