Getting Search Queries for Google AdWords in Google Analytics – Part 2

Ok so I’ve been doing a bit of research, and I still need to write the script and run a test, but here is the logic I have determined:

If referrer = Google and request_url contains gclid {
utm_keyword = strip_out_search_string(request_url)
}

My only worries is that if you have the Google Adwords Cost Data enabled that despite setting utm_keyword it may overwrite it. This is why I need to do a test. If there are any volunteers, let me know :)

Getting Search Queries for Adwords in Analytics

I think I have come up with a way to determine the search query used to trigger an keyword based ad and then input that data into Analytics.

I’m going to write a plugin for wordpress over the coming weeks – so if you want to see the terms a user searched for, rather than the keyword you bid on in Adwords, in your Google Analytics then watch this space.

The 5 Most Common Google Analytics Mistakes

Ok, so you lazy people out there, I know what your like, you just slap your Google Analytics code on the site and think that its done. Well your wrong, and your messing up valuable data right now! Here are the most common mistakes:

1. Failing to Exclude URL Query Parameters
Nobody ever seems to use this, its great though, it gets rid of all the crap out of the content reports. Every time a page loads with a query string (e.g. http://www.david-whitehouse.org/index.php?SirDickonTwitter=boring), Google Analytics treats it as a separate url to index.php. In order to prevent this, you simply put the variable name (e.g. ‘SirDickonTwitter’) in the handy little box (edit profile, edit main website profile information).

2. Failing to Setup Site Search
Again this is a similar problem to the one above. If you don’t state what your variable name is for the site search then url’s like: http://www.david-whitehouse.org/search.php?q=wanker and http://www.david-whitehouse.org/search.php?q=bagels will both be treated as separate content. Instead you just put ‘q’ in the site search query box and then get it to strip the url of parameters.

3. Goal Conversion Setup
I rarely see this one setup right, people often repeat the final step twice, as they don’t realise Google puts the final one in at the end. Most people don’t even bother setting this up, but the ones who do, tend to do it wrongly.

4. Ecommerce Script Setup
When your setting this up, you have to put your ecommerce code after your tracking code, or it won’t work. Most people just paste it in and adapt it, not realising they need the tracking script before hand and an if statement in their footer to prevent the tracking script showing there.

5. IP Exclusion Filters
If you are going to be working on a site, whether you are the developer/designer or the marketing agency, perhaps even the business owner – you need to be adding your ip address to the exclude filter on the profile (make sure you have an unfiltered profile as a backup though).

AdWords not linking to Analytics

We had a problem at work the other day where our AdWords account was not linking to Analytics. It wasn’t the autotagging option in AdWords and it wasn’t caused by us not choosing the ‘add cost data’ in Analytics, since this wasn’t an option.

The problem was caused on the 23rd/24th of March – Google switched over to their new system in AdWords, which meant all AdWords accounts can only have one Analytics account against them. Where they messed up was when an AdWords account had an Analytics account against it, it would choose the original. In many cases the original was no longer used and contained no information – something which I think they should have taken into account.

Anyway, to fix it you need to:

  1. log into the account with the email address of the account that was originally used
  2. Click on the Analytics tab
  3. Edit Account Settings
  4. Unlink from AdWords account
  5. Then go back to the Analytics tab and link it to the correct Analytics account (the logon will need access to the account in question)

Google Analytics Qualified

Yesterday I gained the new qualification from Google for Google Analytics after passing their Google Analytics IQ test.

The studying I did for the exam was most useful – it will enable me to maximise the profitability of any website.