google analytics on https pages

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

google analytics on https pages

Post by Goran »

To prevent browser warning message using the HTTPS
protocol Google analytics tracking code need to be
tailored in pixelTracking.php for secure access.

EXAMPLE:

Code: Select all

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
echo '<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"></script>'; 
} else {
echo '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>';
}
Last edited by Goran on Mon 2. Oct 2006, 00:12, edited 1 time in total.
User avatar
Oliver Georgi
Site Admin
Posts: 9792
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Post by Oliver Georgi »

But please - this is NO bug! It's just an advice.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Hmm, but phpwcms call the google analytics script from http address... on https pages, looks like a bug to me. :roll:
User avatar
Oliver Georgi
Site Admin
Posts: 9792
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Post by Oliver Georgi »

A bug is a bug - and that's none. It's a feature request. By default phpwcms does not support HTTPS.

That the browser sends a warning message is a security thing - not more.

But no problem.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

I understand, sorry for posting on wrong board. I will use sourceforge tracker in the future. :wink:
Locked