# WP Mautic - Tracking page hits

**URL:** <https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108>\
**Category:** Product Support\
**Created:** [April 5, 2017, 7:18am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108 "2017-04-05T07:18:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 5, 2017, 7:18am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/1 "2017-04-05T07:18:20Z")

</div>

Hey all,  
  
  
  
Just installed the WP-Mautic plugin on the website and by just using the IP address of where the instance was it hooked it up, which is very handy and simple!!  
  
  
  
Only thing though, is that I can’t seem to see it registering any page hits on the dashboard of Mautic at all? Does it take a few days to show up or did i configure the plugin incorrectly?  
  
  
  
Thanks for any helps all!!

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 5, 2017, 7:18am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/2 "2017-04-05T07:18:20Z")

</div>

Hey all,

Just installed the WP-Mautic plugin on the website and by just using the IP address of where the instance was it hooked it up, which is very handy and simple!!

Only thing though, is that I can’t seem to see it registering any page hits on the dashboard of Mautic at all? Does it take a few days to show up or did i configure the plugin incorrectly?

Thanks for any helps all!!

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 6, 2017, 7:03am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/3 "2017-04-06T07:03:52Z")

</div>

Bump!

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 7, 2017, 6:32am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/4 "2017-04-07T06:32:42Z")

</div>

Mautic is no longer tracking any traffic hits

---

<div class="post-metadata">

**Author:** ![OA\_Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oa_andrew/32/497_2.png) [@OA\_Andrew](https://forum.mautic.org/u/OA_Andrew)\
**Post date:** [April 7, 2017, 6:52am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/5 "2017-04-07T06:52:51Z")

</div>

make sure you’re not logged into Mautic when navigating through your site (or log in via an Incognito window)

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 7, 2017, 7:12am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/6 "2017-04-07T07:12:46Z")

</div>

Tried that, it still does not show any hits after the 5th of April.

Also is there a tracking code that we can use to paste onto a web page for tracking hits?

---

<div class="post-metadata">

**Author:** ![OA\_Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oa_andrew/32/497_2.png) [@OA\_Andrew](https://forum.mautic.org/u/OA_Andrew)\
**Post date:** [April 7, 2017, 7:18am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/7 "2017-04-07T07:18:57Z")

</div>

You need this script on all your pages:

```auto
<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','http(s)://yourmautic.com/mtc.js','mt');

    mt('send', 'pageview');
</script>
```

see [here](https://mautic.org/docs/en/contacts/contact_monitoring.html)

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 7, 2017, 7:26am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/8 "2017-04-07T07:26:03Z")

</div>

Thanks a million, Much handier then the WP-Plugin(which im not sure if its working)

Just have to figure out why my Mautic is only tracking visits to the 5th of April now

---

<div class="post-metadata">

**Author:** ![Theobane](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Theobane](https://forum.mautic.org/u/Theobane)\
**Post date:** [April 7, 2017, 8:40am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/9 "2017-04-07T08:40:01Z")

</div>

Figured out a solution, just created a new widget and showed only page visits instead of new & returning vists (which is currently broken by the looks of things).

Thanks OA\_Andrew for your help!

---

<div class="post-metadata">

**Author:** ![OA\_Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oa_andrew/32/497_2.png) [@OA\_Andrew](https://forum.mautic.org/u/OA_Andrew)\
**Post date:** [April 7, 2017, 8:44am UTC](https://forum.mautic.org/t/wp-mautic-tracking-page-hits/8108/10 "2017-04-07T08:44:50Z")

</div>

Glad I could help

just fyi - I placed my script code into a [Google Tag](https://tagmanager.google.com/). see [this thread](https://www.mautic.org/community/index.php/1058-mautic-form-google-tag-manager/p1#p21767)

I also adjusted my mt call to include the logged in user’s email address just to make sure Mautic doesn’t get confused with its contact tracking and IP Address only.  
So something like:

```auto
params['email'] = <current logged in user email address>
mt('send', 'pageview', params);
```

something to be cautious of is where/how to set the email address variable. If you have the WordPress php populate a var with the logged in user and you use html page caching somewhere (cloudflare/w3tc/etc…), then you’re going to have a bad day cause the js variable will be cached as well. We’ve made our site save a cookie with the logged in user’s address, and then updated the Google Tag to read the cookie and save the address into the params array.
