Tag Archives: google

Tracking Non-Page Activity With Google Analytics (updated 3x)

First, let’s define what “non-page activity” means: non-page activity is any action that happens on your website that isn’t a page load or page view. That includes: button clicks that don’t lead to a new page, media player uses, and file downloads.

Google Analytics, and any other javascript-based site tracking tool, can’t track the activity of any area of your website where the tracking script doesn’t appear. That means that the PDF link you put up won’t get tracked in your regular reports without some extra effort.

The easiest and most detailed way to track these sorts of things is to implement something called Event tracking.

First: Are you using Universal Analytics, or original flavor Google Analytics?

If you aren’t sure, do this:

  • Log into Google Analytics
  • Go to Admin (upper navigation, furthest option to the right)
  • Expand the “Tracking Info” section under Property (center column)
  • Click Tracking Code

Click to make bigger

If the tracking snippet looks like this, It’s Universal:

universal tracking example

If the tracking snippet looks like this, it’s classic GA:

old tracking code
Pulled from the developer docs area.

 

If you’re running Classic Google Analytics, I’d recommend upgrading before proceeding to implement Event tracking. It’s relatively painless, and they are working on making Universal the standard for all GA users in the not-too-distant future.

Second question: Are you running WordPress, or using a different way to manage your website content?

If you are running WordPress, I highly recommend picking up the GA plugin created by Audrius Dobilinskas. They make tracking all types of downloads and outbound clicks as simple as a checkbox. Let’s run through this, as it’s the quickest and easiest way I know of to get file download and outbound link tracking into place.

Installing and Using a GA Plugin to Track Downloads as Events

Search “google universal analytics” in the plugin installer of WordPress and this will be the first option. Select Install, and after installing, activate the plugin.

You’ll have a new menu at the bottom of your WordPress left hand menu options called Google Universal Analytics, with a gear icon.

Click this to go to the default page, which is the settings for Universal Analytics. This plugin also provides options for Classic Analytics, and custom code.

UA settings

You’ll need to set the status to “on” and plug in your Tracking ID into the box. You can get your Tracking ID by following the same steps you used earlier to see which version of GA you are running. You can also get your ID from the Property Settings page, seen here:

property settings

To track your file downloads and outbound clicks, check the box next to “Track Events”.  Make sure to save your settings!

That’s it. You’re done. You’re now tracking your site visitors, outbound clicks, and downloads.

The default behavior is to track outbound clicks and downloads as Events.

Let’s Talk About Event Tracking For a Sec

Pros of using Events:

  • Neat, separate reporting
  • 4 distinct reports: overview, top events, pages, events flow

Cons of using Events:

  • Very few!

Events reporting is pretty robust, and it does allow you to see what pages the actions occurred on, which will allow you to backtrack as needed.

You also get 4 possible layers of labeling for events: Category, Action, Label, and Value.

Category is the grouping, such as “File Downloads” or “Videos”.
Action is a sub category to track the literal action that takes place in the event, such as “play” or “share” or “download”.
Label is a third tier of labeling you can use to get specific about the action in that category where you can put file names or other types of classifications, such as “PDF newsletter 34″‘ or “My Movie Unabridged”.
And finally Value, which is any positive number you can use to assign numeric value to your event.

Ok but I don’t have WordPress, so what do I do?

don't cry! We got this!

Ok. So you’ll need to have the ability to edit pages on your website and/or the ability to write and implement basic jQuery.

It’s not as bad as it seems. The GA Developer Docs has the details of integration using jQuery, but allow me to paraphrase to save you a trip. (Frankly that’s one of the worst looking developer documents I’ve ever seen them put out. Clear as mud!)

If the idea of implementing jQuery sends you into a state of low grade shock, do not panic. You can make on page changes to your links to implement Event Tracking.

Andy Forsberg put up a piece on Penguin Initiatives that has some great examples of how to implement Event tracking with GA Universal by hand. It’s generally geared toward WordPress, but it can certainly apply to any site where you have the ability to edit pages and add files.

The part that applies to you, the not-really-a-coder reader, is this:

<div id="text-27">
 <h3>Subscribe</h3>
 <div>
 <a onclick="ga('send', 'event', 'RSS', 'Click', 'All Pages - Sidebar Widget - RSS - Text Link');" href="http://penguininitiatives.com/feed/">RSS</a>
 </div>
</div>

By adding an onclick event to your files and outbound links, you can track these things as Events. Easy-peasy, right?!

Now, a few things you need to know:

  1. The part that reads onclick=”ga(‘send’, ‘event’,  always has to be there, or it won’t work. This is the part that tells your browser “When a visitor clicks this, tell GA to send an event. Everything that follows after that are your semantic labels.
  2. Always make sure your Event ends with ‘);”  if that tiny bit of syntax is off, your Event won’t work. This is easy, but picky.
  3. The order of items after ‘event’, are: Category, Action, Label, and Value. Category and Action are required every time.
  4. Make sure each thing is wrapped in single quotes ‘like this’ and followed by a comma, ‘like this’, 
  5. Don’t use double quotes, single quotes, or commas in Category, Action, Label, or Value. Something like ‘joes chicken shack’, would break your event. Why? Because of the single quote (aka apostrophe) in “joe’s”.
  6. Keep it simple. Come up with Categories like “Files” and “Outbound” to use on all your file downloads and outbound links. Use Actions that are very clear, like “download” and “click”. Use Labels to get more detail, like “2014 TPS Report” or “Corporate Blog” to earmark specific files and links.

Test The Heck Out of Event Tracking

No matter what method you use to implement any type of new tracking, always, always, ALWAYS test it to make sure it’s working. Always. Seriously. ಠ_ಠ

The easiest way to test is to use the (constantly improving) Real-Time reports, which includes specific real time reporting for Events.

 

real time menu event

 

Click on your newly Event-tagged links, and watch for results. If you aren’t seeing anything, get friends and co-workers to click them also. If you still aren’t seeing anything after a minute or more (it’s really fast, it should be within a minute), then it’s time to debug!

After you get Event results in the Real Time reports, you need to follow up with the Event reports themselves. Check the Category, Action, Label, and Value for your tests. Does it meet your expectations? If not, it may be time to go check your implementation.

That’s it! Use it in good health!

 (ノ◕ヮ◕)ノ*:・゚✧

Edit: In a move straight out of the Irony Department, I installed and deployed Yoast’s GA plugin… without testing it. I discovered that my traffic from the last few days had no events! Whoa!

I did a few tests myself, and although the tracking code that plugin uses does capture traffic just fine, it was not sending Event data for outbound clicks. I suspect it has to do with the fact that my account has been upgraded to use Universal Analytics, while the code Yoast uses relies more on the older version.

So what you see above is a revised post, recommending a newer plugin that I have tested and does work. A little searching reveals that Yoast’s GA plugin isn’t supporting Universal Analytics, which is disappointing because their other plugins are actually quite good and are maintained regularly.

So not only is this a lesson in the follies of hastiness and blind trust of plugin creators, but it also hammers home: ALWAYS TEST.

Another Edit: Hey, so the plugin that I’ve switched to? Well, there was an update on 5/12/14 and now they provide eCommerce tracking support for WooCommerce, which is a highly popular online store application for WordPress. This plugin rules!

One More Edit: They had to remove the WooCommerce tracking feature due to compatibility issues. Still rules though. 🙂

Enormous Photo-Driven Ads in Organic Search? Ew.

(Featured image from @ChrisDesrochers on Twitter.)

Yeah you heard me.
http://mashable.com/2013/10/23/google-banner-ads/

Also to a lesser extent: http://adwords.blogspot.com/2013/06/new-image-extensions-enable-you-to-show.html

As an HMFWIC of pay per click within some highly competitive markets, you’d think I’d be thrilled about this. You would be mistaken.

The screen shot shared by Mashable shows an enormous ad that takes up the entire top of the page. While the search in the example is clearly a branded search for southwest airlines and therefore it only makes sense to give them top billing, there are some definite issues.

  • The user is prompted very strongly to select the paid option.
  • The advertiser is paying for the click on a branded search that they are already naturally number 1 for.

This type of advertising puts paid options on very uneven footing with organic results, and with one another.

Paid efforts from those with deeper pockets or a bigger taste for risk could quickly outweigh those with fewer resources on less clear-cut searches by dominating the top of the entire SERP.

Moreover, it psychologically devalues the organic results by shoving them out of the way. We have trained ourselves around the idea that “first is best” when it comes to search results. The evidence around the benefits for being  top billed in Google results  is one of the main reasons SEO even exists.

If the first – and only, depending on viewport size – thing we see upon performing a search is a significantly large paid effort, that suggests that either the search results themselves are unreliable due to marketing manipulation (Cynic’s Disgust), or that everything else isn’t important compared to this heavily emphasized item (a slightly more natural reaction to emphasis from a reliable source).

It creates a larger divide between paid and organic results also by erasing any subtlety currently afforded to paid results by way of their similar-to-organic structure and light background offset. If this were to become a bigger part of paid search, it could well lead to a war of escalation in terms of who can have the largest, flashiest, most “appealing” ad to attempt to drive clicks in the only meaningful place on the page.

Imagine this scenario with a less clearly branded term, or a branded term with less blunt intent to search for the brand.

Perhaps “Mercedes Benz” versus “Mercedes Benz cars”.

Query for "Mercedes Benz"
Query for “Mercedes Benz”

Either query could be purely about the brand.

Query for "mercedes benz cars"
Query for “mercedes benz cars”

Either query could center around an intent to purchase. If a massive brand ad were to dominate the top portion of the SERP, none of the 7 other business advertised or displayed as results would have a shot at first click at all. They are simply out of the running for first-glance choice; forced below the fold by the paid brand effort.

For a purchase-based query like “lease mercedes benz”, Mercedes gets the #1 organic spot as well as the #1 paid spot at the moment. If that top-of-page branded ad dominated this query it could push out all dealerships where their product COULD actually be leased. Although there is already a surprising dearth of dealership presence (ads or otherwise) for this query at the moment.

Query for "lease mercedes benz"
Query for “lease mercedes benz”

The query “purchase mercedes benz” is still heavily in line with the brand, but it has much stronger intent toward an action that probably involves people other than the brand itself. Imagine the search below… but dominated by a large branded effort from Mercedes themselves. How off-putting would that be?

Query for "purchase mercedes benz"
Query for “purchase mercedes benz”

Of course at the end of the day this was just one of many, many tests that Adwords performs, and may not ever make it past a blip on the radar.

I just hope that’s the case, because I can’t see dominating the search results as shown in that southwest airlines example from the Mashable article as a positive change for advertisers or searchers.