# Tracking via GTM

**URL:** <https://community.piwik.pro/t/tracking-via-gtm/4606>\
**Category:** Data collection and tags\
**Created:** [November 5, 2024, 8:28pm UTC](https://community.piwik.pro/t/tracking-via-gtm/4606 "2024-11-05T20:28:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Optizent](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/optizent/32/475_2.png) [@Optizent](https://community.piwik.pro/u/Optizent)\
**Post date:** [November 5, 2024, 8:28pm UTC](https://community.piwik.pro/t/tracking-via-gtm/4606/1 "2024-11-05T20:28:56Z")

</div>

We have setup Piwik PRO code using GTM.  
The code is installed on a subdomain, howvere all the pages in Piwik PRO show the main domain so instead of [https://xyz.domain.com/url](https://xyz.domain.com/url) they show [https://www.domain.com/pageurl](https://www.domain.com/pageurl)

The base code in GTM is loaded via custom html  
and page is tracking using piwik pro template

How do we fix this issue?

---

<div class="post-metadata">

**Author:** ![Optizent](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/optizent/32/475_2.png) [@Optizent](https://community.piwik.pro/u/Optizent)\
**Post date:** [November 8, 2024, 5:16am UTC](https://community.piwik.pro/t/tracking-via-gtm/4606/2 "2024-11-08T05:16:51Z")

</div>

You can close this. It was user error.
