Tracking profile visits with Google Analytics

I'm a big fan of analytics data; therefore I try to collect stats about anything – like visitors that check my web pages/profiles. It’s no different with my profile. profile page uses BBCode markup that is a lightweight markup language used to format posts in many message boards and unfortunately it has no JavaScript support.
Google Analytics (GA) on the other hand makes use of JavaScript code when it comes to the tracking code one must include in their website. This causes a frustrating experience to anyone that tries to integrate the GA tracking code in places where JavaScript code isn’t accepted.

While searching for a solution some time ago I didn’t find a way to solve this impedance, but yesterday after putting a little bit more caring on my Google search query, I finally found a way of filling the gap so that both services could talk to each other: NoJSStats, short for No JavaScript Stats is the missing piece. It’s a free web service. Basically NoJSStats uses Google App Engine to track visitors using just an image or anything that allows external resource requests in the website you want to track.

Here’s what you need to do in order to get analytics data popping up at your Google Analytics account in respect to your profile:

First, let’s configure GA side…

1 - Go to Google Analytics and click the Gear icon at the top right of any page and create a new Web Property:

 Creating a new Google Analytics Web PropertyFigure 1 - Creating a new Google Analytics Web Property

2 - Name the Web Property and in the Web Site URL field enter your profile URL and click Create property:

Filling Web Property with correct dataFigure 2 - Filling Web Property with the correct data

3 - Take note of the Web Property ID assigned to your new Web Property:

Checking Web Property ID that’ll be used when configuring profileFigure 3 - Checking Web Property ID that’ll be used when configuring profile

Now let’s configure side:

4 - Edit your profile clicking in the Edit link located in the right side of your profile page:

Edit button used to get access to profile dataFigure 4 - Edit button used to get access to profile data

5 - Head to the “About You” field and add this line at the end:


Do not forget to click the Save details button.

Two things related to that img URL deserve a note here:

You’re using the GA Web Property ID, for example UA-1234567-89 taken from step 3 above.
You’re pointing to your profile at the last part of the URL.

DO CHANGE these two parts accordingly.

Interesting enough to try is that if you copy & paste the URL from step 5 in your browser, you get this result:

Awesome! NoJSStats does its magic and all GA data -- every single item is assembled and packed into the Request URL's query string (everything after the '?'). For more technical details, see this StackOverflow question: Why does Google Analytics use __utm.gif?

This is everything you need to do. Easy, no?

If you have problems
I have tested this workflow and it’s indeed working as expected. In case you can’t get it working:

If you check the Tracking Code status in GA it says: "Tracking Not Installed". Tracking Code statusFigure 5 - Tracking Code status

It doesn't matter... really. That's because we aren't using the standard JavaScript code provided by GA. GA is waiting to detect the presence of that code. We are not using this approach and so it's OK if it reports "Tracking Not Installed".

Analytics data appear within a time frame. It's not real-time at the moment.

If you still do not see any data after a day or two, please leave a comment in this post and I’ll try to help.

Final notes
You should also see data on GA about your own visits to your profile! You can block this from being counted. Check this: How do I exclude my internal traffic from reports?

One of the advantages of using this approach instead of others like FLAG counter that I usually see all over profiles is that you keep your data private and get way more stats from your visitors. is missing visitor Analytics features in its current incarnation. I sure hope it implements something interesting in this area.

For now, I hope you get a better insight of how your profile is performing in the internetz.