To use GetClicky analytics / tracking codes with Magento’s SSL (HTTPS) protected pages, you have two options. One is to use GetClicky’s HTTPS code throughout the website or use it within an IF clause. The following demonstrates an inbuilt Magento funtion to check if the visitor is on a HTTPS or HTTP page.
[php]
<?php // Check if HTTPS ?>
<?php if (Mage::app()->getStore()->isCurrentlySecure()): ?>
<?php // Clicky HTTPS tracking code goes here ?>
<?php else : ?>
<?php // Clicky HTTP tracking code goes here ?>
<?php endif; ?>
[/php]
The above code might come handy for various cases where you might need to check for HTTPS.
Written by Gordon
Topics: Magento