SEM Wired

Posts Tagged ‘ google analytics ’

microsoft-bing-google-analyticsA new search engine has just been launched and it’s time to update our analytics software.

Google hasn’t released any major update to automatically recognize traffic coming from Bing into Google Analytics but I guess it is not gonna take too long.

In the meantime we can easily tweak Google Analytics just playing around with our tracking code.

In order to add Bing as a search engine we need to use the addOrganic function: _addOrganic[domain, search query]

AddOrganic Function: how it works

The addOrganic function has two parameters:  domain and search query. It basically tells the Analytic engine to consider some referrals as proper search engines, hence appearing on keyword statistics.
This two parameters are embedded in every search query we forward to a search engine:

Google:

http://www.google.com/search?q=[searchquery]

Yahoo:
http://us.search.yahoo.com/search?p=
[search query]

So let’s take a look to a standard Bing query:
http://www.bing.com/search?q=[search query]

As you can see, the right AddOrganic sintaxy would be the following:

pageTracker._addOrganic("bing.com", "q");

We just need to add this line right before the trackpageview() call into our Analytics code.

I think there’s an obvious update on the way but if you are already getting some decent organic traffic from Bing just add this line and see what happens.

Quite an interesting video on how Google  Analytics manages and attributes visits coming from bookmarks. When it comes to direct access it’s always hard to actually define its origin, wether it’s a user who has our URL stored in his bookmarks (an usual  or he just got the url passed by someone or got it from a media campaign for instance…). There’s plenty of possible scenarios this case can apply to.

The video shows some of Google Analytics limitations and weaknesses (a visitor could come first via the search engine, and come back 10 times directly after that and all those visits would still be attributed to search), but it’s interesting to see how it works with cookies.

Since I’m constantly trying to improve my workflow I’m always looking for new add-ons and extension to customize my Firefox installation.

Last time I wrote a list of the most useful Firefox SEO extensions, this time I’ll go through all the Firefox extensions for Google Analytics I’m currently using on my machine.

The main purpose of this extensions is to ease user’s life and also getting a better overview on Analytics: access quickly to custom reports, quickly identify domains, import and export data as fast as possible.

WASP: If it is not the best one from the lot, probably is the most complete of all. It’s not Google Analytics specific, you can use with pretty much any online marketing and analytics solution on the market. It comes with a standalone crawler and it can also provide detailed information about the data being collected trough Query String and Cookies by web analytics solutions (called “tags”, “trackers” or “web bug”) not only by Google Analytics.

GA: this tiny bit of code just tells you if Google Analytics is running on the page you currently visiting. Not big deal. Still useful for those who need to do some reverse web-engeneering… Here’s the author’s homepage.

Fire Analytics: Google Analytics gets as close as one click away with this extension. Set up your personal Analytics account and and flick through your stats straight from Firefox.

Better google analytics: awesome compilation of GreaseMonkey script to enhance your Google stats. It comes with media and social metrics, import&export of tables and dates.

Goal Copy: This extension basically is a work around for those who have a bunch of accounts with the same goals and want to manage them in the easiest way possible. It’s more for the pro-user with an intense use of Analytics, but it might come handy for the most as well.

Google Analytics Notes : this one is for those who have loads of accounts to manage and need to distinguish in between account leaving some notes around. Basically it adds a ‘Show Notes’ button in the GA menu ba. Here’s the author’s page.

Counterpixel: The tool tries to find counting/measurement pixel of tracking software from different services and companies. It’s a good alternative to Ghostery, which I have already mentioned on this post.

how to see ip address with Google AnalyticsHave you ever wondered of being able to see visitor’s IP addresses with Google Analytics?

It’s actually posssible. It’s an old trick but it works pretty well…

Actually I can think of enough scenarios in which to apply this one:

  • we want to track competitors visitors
  • we want to exclude our own ip address from reports
  • we have to exclude several different ip address on an internal network
  • we want to find out who’s posting spam on our blog’s comments
  • many more…

1. Getting to know custom filters

The weirdest thing though is that we can easily filter ip with custom filters. While creating a custom filter we can set up the IP address as a parameter… even if Google hides it from us.

When creating a custom filter (click on Filter Manager, then Add Filter and from the drop-down menu select Custom Filter) we have to choos the first parameter (Field A -> Extract A) to which makes our filter work. The IP address option is hidden.

2. Hide & Seek

If we’re clever enough to take a peak into the source coude on line we’ll find this on line 76:

<option value="30">Visitor Flash version</option>
<option value="31">Visitor IP Address</option>
<option value="32">Visitor Geographical Domain</option>

The chance to track IP address it’s right there, but to use it we have to write the line down in the drop-down menu… Anyway. It does not work, but we can sort it out anyway.

Back in 2006 someone found this out, then Google quickly patched it.

Still there’s some way to get what we’re looking for.

3. Gotcha!

Giving the right variable to track to the _trackPageview() call we can store all the visitors IPs.

The PHP code would look like this:

pageTracker._setVar("<?php echo $_SERVER['REMOTE_ADDR'];?>");

…it works!

There’s only a problem: it is not legal. According to Google Analytics Terms of Service:

7. PRIVACY . You will not (and will not allow any third party to) use
the Service to track or collect personally identifiable information of
Internet users, nor will You (or will You allow any third party to)
associate any data gathered from Your website(s) (or such third
parties' website(s)) with any personally identifying information from
any source as part of Your use (or such third parties' use) of the
Service. You will have and abide by an appropriate privacy policy and
will comply with all applicable laws relating to the collection of
information from visitors to Your websites. You must post a privacy
policy and that policy must provide notice of your use of a cookie that
collects anonymous traffic data.

It’s a silly restriction honestly. Everyone is still able to parse is own server logs and find out who is who. On the other hand it shows Google’s care for privacy of his users and all internet users. It definetely makes a point for them.

Anyway, it’s a neat trick and still it’s worth to talk about it for the sole purpose of spreading some “hacking” mentality to people working in analytics and marketing.

Disclaimer

This technique is a violation of Google Analytics Terms of Service. This technique might result in Google suspending your account or even worse. I reject any responsability for any consequence of this. This post is intended only for educational purpose.

I don’t mean to break any rules (neither want anybody to do that because of this post) but playing around with code can lead us to interesting discoveries, making us more aware of the tools we use everyday rather than being just simple users… it’s just up to you.