Distinct pageviews for each domain - Custom Report

Hi, i have two domains:

demo1.site.com
demo2.site.com

with same tracking code.

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

How can i do using Tag Manager?

Thanks.

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
etc…

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.

Thanks

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:

2 Likes

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: