The Piwik tag detects the protocol of the page being tracked, and then automatically calls the normal http or secure https Piwik server.

To track your https pages correctly, your server hosting Piwik should work when called from https. For example, https://url/to/piwik/piwik.php?rec=1&idsite=1 should return a blank page. If https://url/to/piwik/piwik.php?rec=1&idsite=1 returns an error, please contact your sysadmin to ask him to enable SSL on the Piwik server.

Many Piwik users successfully use Piwik to report analytics of Ecommerce and SSL secure shops.

On a related note, you can also force the Piwik login form to use secure SSL connections.