Browsed by
Category: code

Is google analytics shit? WordPress metrics for SEO.

Is google analytics shit? WordPress metrics for SEO.

Background So, I’ve been running this site for around 1 month now without hitches, the homepage sorted and the page structure hieracy as it should be. I’ve had analytics on it from the start. My current set-up is: Apache server 2.* Wordpress v 3.5.1 PHP 5.3.3-7 I’m not new to this game, I’ve been running a blog, this blog since 2003. This month has been the first full month when I’ve been able to sit back and analyse things being…

Read More Read More

remove line break characters

remove line break characters

preg_replace to get rid of those pesky line break characters. Particularly for Google Maps bubble’s which take an aversion to non-ASCII chars so as to stop a map rendering altogether. Non-ACSII charactersThis piece of code should be applied when generating a Google Map using any quantity of user generated material. function removelinebreaks($string){ return preg_replace(‘/[\r\n\t]/e’, ‘ ‘, $string);} Also make sure you trim your bubbles, and if you’re particularly nervous check the htmlentities and CDATA[ declarations also. Makes for happier bubbles…

Read More Read More