WordPress as a Bulletin Board system?

Check out bbPress, a Bulletin Board application from the people behind WordPress.

Google Analytics: Tracking over both HTTP and HTTPS

Crownhill’s e-commerce website uses Google Analytics to provide some of our tracking metrics (it’s free, so it gives us instant ROI ;)). One major problem I had was that, when the order process moved from HTTP to HTTPS to protect our customer’s credit card details, browsers would throw up a “Mixed content” warning; something which would most likely confuse and, ultimately, scare customers away.

After a bit of digging around in Google Groups I devised a solution to the problem using a dash of PHP. I’ve provided the code below:

To explain a little. Basically, all I’m doing is checking to see what mode Apache is in, then adjusting the JavaScript source accordingly; to ensure that the browser doesn’t present any Mixed-Content warnings to the customer – we certainly don’t want to scare them off! The rest of the Javascript code is exactly the same as Google Analytics gives you; all I’ve done is change the link to the .js file.

Grab the code in a .txt file