1 site multiple domains

how can i know which alias domain is the most popular for the particular frametime?

do i need to track custom variables? if yes how?


Indeed custom variables is definitely easy to use for tracking alias uses. Record the hostname in a custom variable of scope “visit”. See Custom Variables Analytics - Analytics Platform - Matomo

the report will give you, number of visits/pages/revenue for each Domain alias! cool stuff

Matt, really thanks for all your help, your support is so great, and i appreciate your work on the script.

this is working great!

piwikTracker.setCustomVariable( 1, “%domain%”, “some other var”, “visit” );

(%domain% is my script’s hostname variable)

again thanks so much ill try to support the development somehow in the future

1 more thing can i pass the search engine referer as a custom variable value? cant find anything about keyword, referer url, in the docs. thanks

You want to know the Referrers used for each domain alias correct?

I recommend to then set the custom var as:

piwikTracker.setCustomVariable( 1, "alias", "%domain%", "visit" );

Then, to get the Referrers used to access any alias, you could use segmentation and get the Referrer data segmented to a given alias, or even to ALL alias except the main one:

// segment data to visits that have the alias custom variable set to anything but the main website URL
// you can  add this segment to API requests, or UI reports, for Top Referrers 

Btw I would like to make a FAQ about this question so lease let me know if you work it out

ok i was quite busy and just got to try this out. i perfectly understand what you wanted me to do so its a good explanation.

what id like to do is this:


its not really that important for me, so i id need to hack much i wont bother

thanks Matt :slight_smile:

Happy New Year! If you are still using Piwik and interested in the awesome new feature of “Creating a Custom Segment in Piwik and apply to reports in Real time!” we need YOUR help, with a little or big donation at: http://crowdfunding.piwik.org/custom-segments-editor/

This will allow to dynamically add or edit, a new set of rules for example “Show all visitors from USA and using Firefox and using Google”. This will be done via a simple to use interface. See screenshots and more info here: http://crowdfunding.piwik.org/custom-segments-editor/

We are crowd funding the future of Piwik and this feature in particular. With your help we can do it.