Archives for 

Code

Google Analytics: Track Multiple Accounts (New Code)

There’s often a need to track a single page in multiple Google Analytics accounts. For instance, perhaps you have multiple accounts – one for the client and one for your agency – and you’d like to roll the data into each. In order to do that, you’ve got to have both accounts specified on each page.

This was a fairly easy task with the old Urchin (pageTracker) code but is surprisingly easier with the new Google Analytics embed script that’s supplied.

Basically, you simply add the additional account to the _gaq array! If you’d like to add more, you simply change “b” to “c” and so on, and so on. Keep in mind that you’re dropping cookies with each account you’re adding, though, so don’t get too carried away.

You might also find these posts interesting:


Grow your business with email marketing


Auto-Optimize WordPress Database without a Plugin

 These horses are somehow not cool. Speeding up your blog is. I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are integrating this functionality into WordPress 3.0, I want it now, and without having to use a plugin […] Related posts:
  1. How to tell if your WordPress Plugin or Widget is Activated in WordPress
  2. Get Adjacent Images – More WordPress Functions
  3. Mad Mimi Plugin for WordPress
Continue reading →