# Page Visit Event fired more than once

**URL:** <https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957>\
**Category:** Product Support\
**Created:** [January 29, 2021, 9:20am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957 "2021-01-29T09:20:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/maddy/32/4281_2.png) [@maddy](https://forum.mautic.org/u/maddy)\
**Post date:** [January 29, 2021, 9:20am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/1 "2021-01-29T09:20:02Z")

</div>

**Your software**  
My Mautic version is: 3.2.5  
My PHP version is: 7.3  
My Database type and version is: mariadb 10.2

**Your problem**  
My problem is:  
I have the Mautic Tracking Code managed via Google Tag Manager, and it works, but per page visit the event is fired four times.

I can see it in the browser console and also in mautic, where each event is captured.

 ![Capture](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/aa2196fe48aad156d1dae83157c98cb09b6fa9a6.jpeg)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 29, 2021, 10:26am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/2 "2021-01-29T10:26:49Z")

</div>

Can you clarify if this is on Mautic landing pages or your website?

Have you checked that you are not loading the script in a CMS plugin or similar, in addition to via GTM?

You can PM me the URL if that is easier!

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/maddy/32/4281_2.png) [@maddy](https://forum.mautic.org/u/maddy)\
**Post date:** [January 29, 2021, 10:30am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/3 "2021-01-29T10:30:15Z")

</div>

I am quite sure the integration only happens via GTM, no CMS integration involved here.  
We don’t use mautic for our landing pages yet, so this is the website.

By investigating in the website source code, I can’t find any other code snippets here, so it really should be the GTM only.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 29, 2021, 10:37am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/4 "2021-01-29T10:37:01Z")

</div>

Yes it looks that way - can you share how you have it set up in GTM - both the custom HTML with the scripts but also the triggers?

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/maddy/32/4281_2.png) [@maddy](https://forum.mautic.org/u/maddy)\
**Post date:** [January 29, 2021, 10:55am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/5 "2021-01-29T10:55:46Z")

</div>

all right, this was the correct question to ask - the GTM config allowed for several events to be fired per page hit, in contrast to what our consent management has documented.  
So we fixed it now by limiting the event to ‘once per page’ in GTM.

Thank you for the support, the topic is solved.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 29, 2021, 11:08am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/6 "2021-01-29T11:08:00Z")

</div>

Hurrah! Glad you got to the bottom of it - I want to get this better documented in our docs as it is quite a common way of implementing the script nowadays but we do not have any guidance - would you be up for helping to draft something?

---

<div class="post-metadata">

**Author:** ![DavidSchargel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/davidschargel/32/2287_2.png) [@DavidSchargel](https://forum.mautic.org/u/DavidSchargel)\
**Post date:** [January 29, 2021, 2:02pm UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/7 "2021-01-29T14:02:40Z")

</div>

> [@](#):
>
> …can you share how you have it set up in GTM - both the custom HTML with the scripts but also the triggers?

@maddy I’d be interested in seeing this too!

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/maddy/32/4281_2.png) [@maddy](https://forum.mautic.org/u/maddy)\
**Post date:** [February 1, 2021, 6:23am UTC](https://forum.mautic.org/t/page-visit-event-fired-more-than-once/17957/8 "2021-02-01T06:23:17Z")

</div>

I can not provide this information, because for my company someone else is managing the GTM, I don’t have any access here.
