Distinct pageviews for each domain - Custom Report

Hi, i have two domains:


with same tracking code.

Using Custom Report i would like to make two pageviews report:

How can i do using Tag Manager?


Hi @SimoneF when using Custom Reports, you can select what website for the Custom Report will apply for. You can learn more here: Create and analyse custom reports

Yes, but demo1.site.com and demo2.site.com are in the same website (called DEMO SITE) and share same tracking ID

I have to select the urls with a filter and that’s what I did.

In detail this is what I did:

  • I created a Custom VIsit Dimension “Complete URL”
  • in tag manager i created a variable called “Complete URL Variable” of type “url variable” and i set “Url part” as “Full”
  • in tag manager i created a variable called “Tracking code DEMO"Variable” of type “Matomo Configuration” and, in section “Custom dimension” i set link between Custom Visit Dimension ID and variable “Complete URL Variable”
  • in custom report i created “Most viewed page Demo 1”

Custom report “Most viewed page Demo 1” configuration is:

  • Apply to website “DEMO SITE”
  • Type “Table”
  • Dimension:
    — Page Url (standard dimension of Matomo)
    — Complete URL (my custom dimension)
  • Metrics “Pageview”
  • Filter " Complete URL contains ‘demo1.site.com "

When i open custom report result i get something like:

demo1.site.com/page21.htm - https://demo1.site.com/page21.htm
demo1.site.com/page3.htm - https://demo1.site.com/page3.htm
demo2.site.com/page52.htm - https://demo1.site.com/page14.htm
demo1.site.com/page55.htm - https://demo1.site.com/page55.htm
demo1.site.com/page25.htm - https://demo1.site.com/page25.htm
demo2.site.com/page5.htm - https://demo1.site.com/page22.htm

What i don’t understand is why sometimes, in some row, it appears dome2.site as value of “Page Url Dimension” and demo1.site as value of “Complete URL Custom Dimension”

Why Matomo assign two different urls to the two variables? Why sometimes the variable Page Url takes on a value that it doesn’t respect the filter rule?

I hope I managed to explain my doubt.


Hi @SimoneF

I would suggest you use custom action dimension on the subsite. You may probably automatically extract the subdomain in the dimension dimension:

Then as first dimension in your report, you just have to use this dimension :wink:


Yes, i tried to set both, custom action dimension and custom visit dimension, for subsite, and result is (considering only home page of subsite for test):

  • pageviews for custom action dimension and pageviews in standard report are equal
  • pageviews for custom visit dimension are less than pageviews in standard report

so, custom action dimension seems to give the correct filtered result.

But I’m not very clear difference between custom action dimension and custom visit dimension. I got an answer from the empirical evidence but… i didn’t understand the logic… :pensive: