The tracking code needs to be in the footer (or load) for each page. The SiteID i’m referring too is your Piwik SIteid which is created for each unique site added into the Piwik system.
This SITEID is added to the tracking code you generate/copy from within Piwik, which should load for each page in the domain.
If you are also tracking another website say ‘www.yahoo.com’ this needs to be setup as another site in Piwik with it’s own SITEID & it’s own tracking code.
You can however have CNAMES which are different for each url, but point to the same place - these will be tracked as soon as the javascript loads with the relevant siteid.
The first part of the domain name remains the same? As long as your .NET webserver adds the javascript code to each url it produces the tracking will be there for each individual page within the same SITEID. So not tracked as the same page, but tracked as part of ‘www.google.com’ for example.
You can use JavaScript to manipulate the page title that is tracked in Piwik. Use your server-side code to define a standardized page name for each request, and then set a JavaScript variable with that value.
Guys even I have a query…
I am working on an application which has 3 envs dev/stage/prod so based on this the siteid should change. how can i make this dynamic.