Your software
My Mautic version is: 5.0.4
My PHP version is: 8.1.28
My Database type and version is: pdo_mysql 5.7.44-48-log
Your problem
My problem is:
The tracking script for our external website no longer identifies leads, ever since upgrading to mautic 5.
Events fire correctly, and existing leads update their last_active information. However, new leads remain forever anonymous, with none of the custom information that we send across being acknowledged.
We add custom lead info via the script tag like so:
<script>
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://mautic-url/mtc.js','mt');
mt('send', 'pageview', {email: 'lead@email.com', firstname: 'name'} );
</script>
Here is an example of the event being recorded. This is me debugging through localhost.
And here’s the payload when the event call is firing:
(that’s just a disposable email I’ve used to test with)
Steps I have tried to fix the problem:
- I’m debugging on incognito
- Email and all other relevant fields are set as publicly updateable
- There aren’t any logs in Mautic itself
- I’ve set
do_not_track
to false just in case that would have anything to do with it.
One thing I’m not sure of is whether there’s a specific cron job or configuration that needs to be set up in order for this to work.
I’ve read through several posts where people are flagging the same issue and it seems that for some the publicly updateable toggle has fixed the problem but ours is definitely enabled.
Would be very grateful to anyone that could point me into the right direction with this!