To track your https pages correctly, your server hosting Matomo (Piwik) should work when called from https. You will need to buy a SSL certificate for your Matomo server.
Many Matomo (Piwik) users successfully use Matomo to report analytics of Ecommerce and SSL secure shops.
The Matomo (Piwik) tag detects the protocol of the page being tracked, and then automatically calls the normal http or secure https Matomo server.
To check whether your Matomo (Piwik) server works over HTTPS, go to:
https://url/to/piwik/piwik.php?rec=1&idsite=1 – if it returns a blank page it is working. If
https://url/to/piwik/piwik.php?rec=1&idsite=1 returns an error, please contact your sysadmin to ask her to enable SSL on the Matomo server.
On a related note, you can also force the Matomo (Piwik) login form to use secure SSL connections.
To ensure that your visitors and all their actions on SSL HTTPS pages will be correctly tracked in your Matomo (Piwik), you need to check that your SSL Matomo Server is correctly configured.