Using 2 or more Piwik installations to track one website

Piwik transitions report

First, you only have to load one instance of piwik.js regardless of the number of trackers you want to use. In the multiple Piwik trackers example below, we load the single instance from server-1.com/piwik.js. Next, we need to create 2 instances of Piwik.getTracker: piwikTracker1 and piwikTracker2. Then we call the trackPageView with each tracker to … Read more

How to redirect non-www to www with htaccess

Yellow and Black 2-Way Signage - pexels.com/photo/art-background-brick-brick-texture-272254/

Here’s a short tutorial to permanently (301) redirect non-www website address, such as mydomain.com, to www.mydomain.com. We will edit the .htaccess file on the web server. This method is applicable to Apache web server running on Linux. Here’s the 4 lines of codes to be added to the .htaccess file: RewriteCond %{HTTP_HOST} !^www\..* RewriteCond %{HTTP_HOST} … Read more