# GTM + Piwik Pro

**URL:** <https://community.piwik.pro/t/gtm-piwik-pro/2596>\
**Category:** Data collection and tags\
**Created:** [July 13, 2023, 3:53pm UTC](https://community.piwik.pro/t/gtm-piwik-pro/2596 "2023-07-13T15:53:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Connelore](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@Connelore](https://community.piwik.pro/u/Connelore)\
**Post date:** [July 13, 2023, 3:53pm UTC](https://community.piwik.pro/t/gtm-piwik-pro/2596/1 "2023-07-13T15:53:12Z")

</div>

Hi all,

i am new to Piwik Pro, so sorry for any stupid questions. As background the setup consists of GTM + Piwik Pro.

1. I see always two page view events: one is sent when the page loads and one when i leave the page, any clue why this is happening?
2. How can i actually add any events to GTM and analyse them then in Piwik Pro. Is there any instruction online i could follow?

Thanks a lot,  
Connelore

---

<div class="post-metadata">

**Author:** ![sararekowska](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/sararekowska/32/1582_2.png) [@sararekowska](https://community.piwik.pro/u/sararekowska)\
**Post date:** [July 14, 2023, 7:55am UTC](https://community.piwik.pro/t/gtm-piwik-pro/2596/2 "2023-07-14T07:55:43Z")

</div>

Hi there!

1. Where are you checking the page view events? Do you perhaps track page views in GTM too?

2. For this I recommend you to look into our developer documentation: [API — Piwik PRO Analytics Suite 17.5 documentation](https://developers.piwik.pro/en/latest/data_collection/web/javascript_tracking_client/api.html#tracking-functions). Piwik PRO tracking container sets up globally accessible command queue `_paq` . You can issue commands by using it in your tags and pushing them onto the command queue with `_paq.push` function. For example: `_paq.push(["trackPageView"])` tracks the page view.
