Upcoming LunaMetrics Seminars
Seattle, Nov 3-7 New York City, Nov 17-21 Washington DC, Dec 1-5 Los Angeles - Anaheim, Dec 8-12

Author Archive

Data Layer Forensics: Ecommerce Edition

DataLayerForensics-Ecommerce-blog

Troubleshoot ecommerce analytics by taking a “data snapshot” the moment tracking occurs. Use our code and handy checklist to detect hard-to-find issues.

Something is wrong with your ecommerce analytics data, but you’re not sure exactly what. You’ve checked the tracking code and it looks fine. That means the problem is probably coming from the server side.

Server side code takes transaction details — like products, quantity, and price — and places them where your analytics tracking code can read them.

If the transaction details don’t make sense, you’ll have problems such as transaction revenue with no products, or products with no revenue. If some details are malformed or missing, the tracking code may fail entirely. (more…)

Dynamic Data Viz: A Better Way to Plot Rows in Google Analytics

Have you ever tried to use the “plot rows” feature in Google Analytics and it literally falls flat?

It happens because you can’t keep the chart from graphing the metric total. That thick blue line across the top of your chart flattens everything else. It keeps the size of the chart static, rendering it useless.
Drink me potion and key on table next to miniature door

Wouldn’t it be great if you could graph only the rows you want and the chart would dynamically resize?

Here’s the key to turning those flat, plotted rows into dynamic data visualizations: motion charts. (more…)

Are You Missing Referral Traffic in Universal Analytics?

Don’t fall for that old Jedi mind trick and simply ignore what Universal Analytics tells you to ignore… they might be the referrals you are looking for.

fooling the troopers with an old mind trick

Did you know that Universal Analytics’ default setting is not to count referrals from your domain? That’s right, Universal Analytics is going to ignore self-referrals by default. This may not be a good thing if you need the information to fix coding errors, but that’s another story.

Today’s story is how to make sure that your idea of self-referrals matches what Universal Analytics is calling a self-referral. If it doesn’t, you may be ignoring some referrals that you didn’t want to ignore. Depending on your situation, you may need to change a setting or even add some custom code to see all the referrals you want.

Read more to understand what’s really going on with referrals in Universal Analytics so you can make an informed decision about what to ignore.

(more…)

One Goal, Many Values with Lookup Tables in Google Tag Manager

Google Analytics Events + GTM Lookup Tables = Super Groovy Goal Values!

psychedelic_guitar_wallpaper_by_jefferywright-d3g9es6

Here’s a familiar refrain: Need KPIs? Assign goal values to your non-ecommerce goals in Google Analytics – for example, calculate the average value of a lead and enter that as the goal value.

And a less-familiar verse: Should you settle for the average value? Not if the actual values vary widely. Distributions matter!

Suppose you have one lead form for many types of leads. The user might request info about option A, a potential sale worth nearly twice as much as option B, and five times as much as option C. And what about options D, E, F, and so on?

New verse: You don’t have to give them all the same goal value. And you don’t have to create multiple goals to give them each a different value.

Send different event values to Google Analytics for each type of lead with a lookup table in Google Tag Manager. And then set the event value as the goal value in the Google Analytics interface.

You say your goal is based on the thank-you page URL and not an event? No problem. Fire an event when the user reaches the thank-you page and use that event to define the goal instead.

Follow these four steps to add more meaningful values and make your goal data rock.

(more…)

Google Tag Manager Readiness Checklist: 42 Ways to Prep Your Site

Don’t wait until you urgently need a new tag to discover you also need your developers. Put the right infrastructure in place and reap the full benefits of Google Tag Manager.

May 25 is Towel Day

Google Tag Manager is so easy to use, you can start adding tags to a site as soon as the developers put up the GTM container code. To make the most of it, though, you will need your developers’ help.

Some information should not (or cannot) be hard-coded into the tags, because it depends on each visitor’s behavior on your site. What did the visitor buy? What articles did they read? What videos did they watch? What forms did they complete? I could go on (and do, below).

Your developers can pull information from the back-end of your site and make it available on the page. They can also prepare various page elements to work with Google Tag Manager’s listeners, rules, and macros. It all means smoother sailing for you when you want to add tags later.

Follow this checklist to prep your site for Google Tag Manager, and you’ll be ready for almost any tagging request. You’ll be the hero who always knows where your towel is.
(more…)

Google Tag Manager Disaster Recovery Guide

Dave on a space odyssey

Some day, even after diligently testing, you may publish a new version of your Google Tag Manager container and disaster will strike. The site, or some critical site function, will break. Or tracking will drop to zero. (Or both!) Will you be ready to fix things?

It’s as easy as “the click of a button” to revert to a previous, working version of your tag container, according to many articles about Google Tag Manager. What most of these articles do not say is which button to choose.

Yes, there’s more than one way to restore a previous version. (more…)

Cheat and Win with Google Tag Manager: Easy Dynamic Content Tracking

Sometimes Tag Manager is so easy it feels like cheating. In a good way. Like getting a super acorn power-up and turning into Flying Squirrel Mario.

flying-squirrel-mario

Recently I used my flying squirrel powers to beat the dynamic content boss. My client wanted to track how visitors used a couple different search forms, each with multiple options. Every time an option was selected, new search results would appear dynamically and a parameter would be added to the URL hash.

For example, if the visitor chose to view all the seminars on day 1, the URL would become /seminarsearch#day=1. Search those seminars by topic X and the URL would change to /seminarsearch#day=1&topic=x.

Or it might be a different search form, say for vendors, and the URL might look like /vendorsearch#category=abc&location=bldg2.

How was I going to tackle all those moving parts and get the data I needed into Google Analytics? I wrote a couple different pieces of code that were unsatisfactory for one reason or another.

And then I found my super acorn. (more…)

How to Track Hover Events with Google Tag Manager

hover craft joy ride with dolphins

When visitors hover on your website, are they more likely to convert? Pick a hover target and add event tracking to find out.

If you want to listen for clicks or form submissions, Google Tag Manager has some seriously awesome automatic event tracking. It doesn’t cover hover events yet, though. So if you want to track a visitor hovering over a menu or pop-up window or other such thing-a-ma-jig, read on for a nifty bit of jQuery that will do the trick.
(more…)

Unlock the Data Layer: A Non-Developer’s Guide to Google Tag Manager

key in lock

There’s nothing mysterious about the data layer for Google Tag Manager. It’s just a place to hold information so your tags can refer to that info when they need it. Do you need a developer or not though? Can you use the data layer if you’re not a developer?

This post discusses how information gets into the data layer, and how tags use that information. Understanding the data layer is the key to making the most of your Tag Manager implementation. Along the way we’ll see where you need a developer and where you can do things yourself. (more…)

Google Analytics Filters: Don’t You Forget About Me

breakfast-club

Why do advanced segments get all the love in Google Analytics? What about report filters and profile (view) filters? Filters and segments work differently. Do you know when you need a filter instead of a segment?

You may think a segment is isolating the data you want and instead it returns too much data. Or you may think you’re getting all the data you want, and later find out a big chunk is missing.

To understand when you need a filter, it helps to know how filters and segments work. I highly recommend a read, or re-read, of Avinash Kaushik’s explanation of hits vs. sessions, because it all comes down to segments working on the session-level, and filters working on the hit-level.

But first let me show you how segments can go wrong. (more…)