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 users successfully use Matomo to report analytics of Ecommerce and SSL secure shops.
The Matomo 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 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 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, you need to check that your SSL Matomo Server is correctly configured.