Using multiple Mautic script calls on the same page

If you add the standard Mautic mtc.js tracking script to your website, but then add a tracking pixel to add tags to specific pages along with a focus item (exit pop-up for example) you end up with 3 Mautic javascript calls. Since updating to 3.1.0 I have noticed very occasional MYSQL errors regarding the last_active table:

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock

Apparently this error relates to a script trying to write to a database table that is already being written too. It occurred to me that this might be caused by having the multiple Mautic tracking scripts.

Anyone have any ideas on this?

Have you tried adjusting lock time?

Hi

Thanks for the suggestion. I didn’t know that the Max Lock setting applied to contact records. Good to know.

I managed to arrange things on my site so that pages with a tracking pixel gif + tags don’t have the regular Mautic tracking script added. So far I am not seeing the 1213 deadlock error, so it looks like it was indeed multiple Mautic script calls that was the problem here.

Ideally I think Muatic should provide the ability to add tags to the standard tracking script. As far as I am aware using the old tracking pixel method is currently the only way to tag pages.