How to add BBClone to a Wordpress Blog
I like being able to see the stats of my blog, who is visiting, amount of traffic, how do visitors find me, how long do they stay, which sites send me the most referrals, which keywords, etc. I was surprised to see my new blog Heidi’s Cards, place in the search engines for several phrases which included keywords from my category names and post titles. Just a trickle of traffic, but encouraging just the same.
Different stats program show different things, and I’ll be the first to admit there is much I don’t know about the various stats programs, what they do, how they work, which one is the best, etc. I’ll probably never be an expert at all of that. BBclone does what I want for now, which is good enough.
I’m posting this information here as I don’t want to lose the steps, and others may find it useful. As I moved to a new host, I wanted a web stats program, and discovered a quick easy way to add BBClone to the wordpress blogs I’ve moved to my new webhost . Now I know which pages visitors enter/leave, where they com from, I can even click in the detailed stats and see which search engines searches referred them to me, what keyword or phrase was used, whose site referred them, how long they visited, which pages, etc.
Upload bbclone to my blog’s host.
My host allows me to do such. I uploaded
http://bbclone.de/download.php?get=bbclone-0.4.9b.tar.gz into the folder which holds my wordpress blog’s files. IXWebhosting has a WGET button which makes this easier. Push button, copy in url push get.
I decompressed the files. Double clicked on file. Clicked on decompress button. If your host does not have this option, you may need to unzip the files on your desktop before uploading to your web host.
You should now have a folder called bbclone, You can rename that file folder, if you wish.
Next came the tricky part, you want to add a little bit of code to each page so the stats program will work. But where to put it, I don’t want to type code for each page, I wanted to put it in one place. While I searched wordpress forums for the answer and found this bit of code to add, My son, Tim Caswell, showed me where to add the code so it would work as I wanted. Teamwork is great.
Add this code:
if (is_home() == true) {
$pagetitle = "Home";
}
else {
$pagetitle = wp_title('', false);
}
define("_BBC_PAGE_NAME", $pagetitle);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) { include_once(COUNTER); }
else { echo "Counter is broken."; }
To the file template-loader.php in the wp-includes folder right after the first < ? php command.
Note: if you change the name of your folder you will need to change code too. After “_BBCLONE_DIR”, change “bbclone/” to “whatever you named the file/”
To access your stats go to the url: http://yourdomainname.com/bbclone/ Be sure to notice the links on the bottom to additional stats.
Jan 6th, 2008 at 10:37 am
Heidi,
I’m so excited you are going to be a part of the upcoming Blogging Teleseminar on Thursday, January 24th. You are such a wealth of information and people who attend are going to be so glad they did! That includes me too!
Feb 24th, 2008 at 1:30 am
Interesting article. You can also see a top 10 hosting reviews at http://www.nr1top.com/tops if you are interested in getting hosting. I hope you will like the reviews and that they will help somebody in choosing there hosting.
Mar 6th, 2008 at 11:21 am
Nice piece of work. I have added it into my blog.
Thank you.
Mar 24th, 2008 at 11:55 pm
Thank you for posting this… helped me with my site
Dec 10th, 2008 at 3:03 pm
Thank you. Code worked terrific!