# Using multiple Mautic script calls on the same page

**URL:** <https://forum.mautic.org/t/using-multiple-mautic-script-calls-on-the-same-page/16313>\
**Category:** General Discussion\
**Created:** [September 28, 2020, 1:33pm UTC](https://forum.mautic.org/t/using-multiple-mautic-script-calls-on-the-same-page/16313 "2020-09-28T13:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![plato39](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/plato39/32/2343_2.png) [@plato39](https://forum.mautic.org/u/plato39)\
**Post date:** [September 28, 2020, 1:33pm UTC](https://forum.mautic.org/t/using-multiple-mautic-script-calls-on-the-same-page/16313/1 "2020-09-28T13:33:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [September 30, 2020, 11:32am UTC](https://forum.mautic.org/t/using-multiple-mautic-script-calls-on-the-same-page/16313/2 "2020-09-30T11:32:48Z")

</div>

Have you tried adjusting lock time?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f250e3862005f79e8f6e297f25456c30c76a0ea3.jpeg)

---

<div class="post-metadata">

**Author:** ![plato39](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/plato39/32/2343_2.png) [@plato39](https://forum.mautic.org/u/plato39)\
**Post date:** [October 1, 2020, 3:04pm UTC](https://forum.mautic.org/t/using-multiple-mautic-script-calls-on-the-same-page/16313/3 "2020-10-01T15:04:58Z")

</div>

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.
