This is a hot topic, as cookie based tracking can be tricky in a multi-domain environment. I started to work on a solution couple of months ago, and ended up creating a plugin, that helps with the multi-domain tracking.
In order to get you covered in your multi-domain tracking endeavors, I would like to share 2 videos and some code with you. Have fun.
If you are trying to track multiple domains with Mautic, you’ll face the following issues:
- You need to serve first party cookie to your Mautic domain on every tracked domain.
This means: if you have Mautic on domain1.com, you can’t freely track domain2.com anymore. You need to set up a tracking domain using a CNAME, like mautic.domain2.com, that resolves to domain1.com.
- In order to have great inboxing rate you’ll need to keep the domains in your email relevant to the sender, and the content you are sending.
This means: if your Mautic is on domain1.com, all your unsubscribe links and other links in your emails will have domain1.com. This domain can influence your inboxing rate even if you send from domain2.com. However you can add tracking domain in this case as well, and with the help of the Multi-Domain plugin you can now mask all your links and delete tracks from the Mautic domain.
You can learn more about why Multi Tracking matters in the following Mauticon presentation:
Watch the Marketing Automation Show for a walkthrough, and start using Multi-Domain tracking
You can download the plugin here:
https://github.com/friendlyis/mauticmultidomain
Do you have questions? Add it to the comments!
Just wanted to check if I understood everything since my set up is somewhat different.
My Mautic instance is at
connect.website.nl
And I have another website at another server
otherwebsite.com
So in cPanel at otherwebsite.com, I create a CNAME
connect.otherwebsite.com
pointing to
connect.website.nl
And in cPanel at website.nl, I create an add-on domain
otherwebsite.com
with subdomain
connect
pointing to the root of my Mautic instance.
Next in my otherwebsite.com site, I change the tracking link to
connect.otherwebsite.com
instead of
connect.website.nl
And finally, in Mautic in the Multidomain plugin settings, I want
marcel@otherwebsite.com
to use the domain
https://connect.otherwebsite.com
Correct 🙂 You got it!
Just installed.
Beyond the dns and server configurations, are there any configurations with the plugin itself.
I don’t see the Multidomain plugin settings?
Hi, no other settings are needed.
All tracking links will be overwritten based on the Multi Domain settings (left menu.) Add the email and the domain that should be used for masking.
As it is in Beta, newsletter image content is not overwritten, you have to do it in your html.
Does this affect any of the SMTP setup? Bounce handling or anything like that?
No because bounce handling is a return process, you will still listen on the same channel with the same domain as before.
Thanks for the plugin and the explanation.
You said that the current version of the plugin only works with Mautic 3.x
Any idea when there will be a version of the plugin that works with Mautic 4?
Hello Luca,
I already tested the plugin with 4.0.0 and it seems to be working just fine. 🙂
Go ahead and give it a shot!
Thank you Joey, I will!
has anyone tried accessing your website using latest safari browser , where 3rdparty cookies do not work, and succeeded with this configuration ?
will mautic forms work too ?
Hi,
The point is, that you serve first party cookies, so you are not affected by evil Safari rules.
Forms? Hmm. I’m not sure, good point 😀
Anyway to change the message-id in the header? The plugin is working good, however the message-id: still shows the original host domain, not the tracking domain.
Hi, we might work on that in Mautic 5.
Any ideas on how to make dynamic web content work across domains? It seems that the DWC http request goes to the base URL in the configuration regardless of what domain is used to call mtc.js.
Hello Steve!
Good question. It depends on website settings I beleive, but you can always CNAME the other domain, so you would stay in the first party realm.
Hi Joe,
I can not install it on Mautic 4.4.1. I have uploaded it to plugins folder, but it doesn’t show in my plugins. Any idea what could be the issue?
Thanks,
Pete
Hello Pete,
Can you refresh the plugins?
On the plugin page there is a buttom on the right upper corner.
Hi Joey,
I don’t have such button. What could be the problem? It is not version 3 though.
Thanks,
Pete
Hi,
You need to install the plugin:
https://github.com/FriendlyDotCH/mautic-multi-domain
Hi Joye,
I already did and fixed permissions, but doesn’t show in plugins.
Thanks,
Pete
i have some issues with SSL 🙁
Hi, there are many guides about this? What webserver are you using?
Hello Joe, After uploading the plugin to my plugin folder and deleting the cache and pushing the ‘Insatall/upgrade plugins’ button, the plugin is not showing up.
This is the content of my plugins folder with the Owner / Group and permissions:
drwxr-xr-x 14 www-data www-data 4096 Feb 28 2022 GrapesJsBuilderBundle
drwxr-xr-x 17 www-data www-data 4096 Feb 28 2022 MauticCitrixBundle
drwxr-xr-x 12 www-data www-data 4096 Feb 28 2022 MauticClearbitBundle
drwxr-xr-x 9 www-data www-data 4096 Feb 28 2022 MauticCloudStorageBundle
drwxr-xr-x 15 www-data www-data 4096 Feb 28 2022 MauticCrmBundle
drwxr-xr-x 9 www-data www-data 4096 Feb 28 2022 MauticEmailMarketingBundle
drwxr-xr-x 16 www-data www-data 4096 Feb 28 2022 MauticFocusBundle
drwxr-xr-x 13 www-data www-data 4096 Feb 28 2022 MauticFullContactBundle
drwxr-xr-x 6 www-data www-data 4096 Feb 28 2022 MauticGmailBundle
drwxr-xr-x 13 www-data www-data 4096 Aug 31 11:11 MauticMultiDomainBundle
drwxr-xr-x 7 www-data www-data 4096 Feb 28 2022 MauticOutlookBundle
drwxr-xr-x 17 www-data www-data 4096 Feb 28 2022 MauticSocialBundle
drwxr-xr-x 13 www-data www-data 4096 Feb 28 2022 MauticTagManagerBundle
drwxr-xr-x 4 www-data www-data 4096 Feb 28 2022 MauticZapierBundle
I have installed the plugin on a fresh Mautic 4.2.0 instance
Any Idea what could have gone wrong?
Hey,
Good question. Any errors in your log? Gear Icon -> System -> Error Logs ?
Hey Joey, could you help.
Before the installing the plugin… I send a test message to one contact… All good.
After installing the plugin ( Tried With and Without adding a domain+email pair in the plugin)… When i send a test email i get:
Uh oh! I think I broke it. If I do it again, please report me to the system administrator!
500 Internal Server Error
PHP Version 7.4.32
Mautic v4.4.3
Thank you!
Weird. Altough Test emails are not affected by the plugin.
Hey Joey, could you help.
Hi, I installed and used this plugin before and it worked fine.
It’s just that all the links in my email have been modified to the new domain name, so I deleted the configuration of this plugin, but the links in the email did not restore to the system domain name I configured; then I deleted the plugin and cleared the cache directory. But the link in the email still hasn’t returned to the system domain name I configured.
I would like to ask how can I completely restore the domain name configured in my system.
may thanks!
Hi, I also answered you on Youtube, where you left the same comment.
If you remove a plugin, clear the cache and maybe also run bin/console mautic:plugins:reload, then it should be gone from your system.