HTTP tracking bugs

So far I have noticed two things.

  1. The first one is about the url parameter. It seems that it is required for the URL to have either “http://” or “https://” prefix, to be recognized as a valid URL from Matomo. However, when I specify either http or https in my url parameter, Matomo records the log as http, or https, in a random way. For example, from your documentation page, if I either use this
url -i -X POST -d '{"requests":["?idsite=1&url=http://example.org&action_name=Test bulk log Pageview&rec=1","?idsite=1&url=http://example.net/test.htm&action_name=Another bulk page view&rec=1"]}' http://piwik.example.com/piwik.php

or this (notice the https in the url parameter):

url -i -X POST -d '{"requests":["?idsite=1&url=https://example.org&action_name=Test bulk log Pageview&rec=1","?idsite=1&url=https://example.net/test.htm&action_name=Another bulk page view&rec=1"]}' http://piwik.example.com/piwik.php

the logs are recorded as “http”. On other urls, the logs are randomly recorded as https even though I specify an http prefix. This means that sometimes the link redirection from the records might not work, if for example the page that I am tracking is using only https, pointing to an http webpage will show that this page doesn’t exist.

My question is, should I hardcode prefix my urls, for example “example.com/home” with either “https://example.com/home” or “http://example.com/home” ?


  1. The second one is the urlref parameter. It doesn’t really seem to work at all for me except for some very specific websites.