Tracking sessions on sites that use http mainly but use https for some pages

I have a site that uses http for most pages but uses https for checkout and payment pages. Currently piwik is tracking these sessions fine but i end up having 3 separate sessions for the user journey instead of one. This is most definitely due to the transition from http to https. Any tips on how to handle this would be greatly appreciated.

Hi please feel free to create a bug report at: Issues · piwik/piwik · GitHub
with as much information as you can (maybe a screenshot of the visitor log showing the too many visits created)