Posts Tagged ‘tips and tricks’

Sep 02
2014

fitness analytics
Labor day just passed which pretty much marks the end of summer vacation. The party’s over, as they say, and it’s time to get back to work. Children get back into routine for school, students gear up for another semester, people reminisce over summer vacations and plan out the rest of the year, and of course businesses begin to buckle down for Q4 so they can finish out the year on a strong note. It’s a time to re-evaluate, tweak and re-establish goals. There’s also that iPhone 6 announcement coming next week, but I digress. :)

One of my goals for this year was to make significant strides towards being healthier. As with anything else this requires physical effort, but more-so than that, it requires mental discipline.

I’ve noticed in the last couple of years, the huge influx of wearable fitness trackers that measure everything from steps taken, to distance, to elevation, to heart-rate, to sleep. It’s impressive what data these little devices can capture and the exhaustive reports that can be produced.

Being a data geek combined with this goal of being healthier, I decided to invest in my own tracker. While there are many options available, they are all very similar and you basically have to find one that you’ll use. Features and functionality aside, if they sit at home instead of on your person, they’re a waste of money. So my main requirement was comfort. After an exhaustive search I decided to try out the Jawbone UP24. It’s an amazing little device, and pumps out quite the stream of data. Color me impressed!

I was talking to my colleague Farid the other day about these fitness trackers prior to making the decision to purchase. To be honest, this rarely happens, but on this auspicious day, Farid had some words of wisdom which echoed in my mind for days [Edited and rejected by Farid Alhadi]. He said, in reference to the large selection of devices available, “You know, they’re essentially all the same, and they don’t do much unless you use them, but what they do is provide is that little extra motivation.” Ok, he didn’t quite make the discovery of the century, I’m probably being kind of dramatic to his compliment, but you get the point. [Edited and rejected by Farid Alhadi]

“That little extra motivation”? Maybe that’s the difference between being healthy and not quite there? Could the line in the sand really be that narrow? Would data be all I need to help me run that extra mile, or do those extra reps? Really? Could it be that a dashboard of my fitness stats would help me take that step that I’ve been trying to take for so long? Wait a second…dashboards, metrics, data, insights??? this is starting to sound a little too familiar.

Here’s some samples of the type of reports that this little thing produces:
fitness_dashboard

More importantly, this got me thinking. (Yes I know I’m a geek…you don’t need to remind me). Doesn’t a fitness tracker essentially do what Analytics does for a business? Just as a fitness tracker captures the performance of an individual based on pre-defined metrics, so does analytics based on similar pre-defined metrics.

1. Use it or lose it. (And I don’t mean the weight).

The fitness tracker is only as good as our usage of it. The same principle can be applied to analytics. It only works if you use it. If I leave the fitness tracker at home, or forget to wear it, or if I don’t calibrate it, the data is going to be useless. Same goes for your analytics tool. Organizations sometimes spend thousands on analytics tools and even strategies, but they don’t put a legitimate effort to use it or even use it right! Your organization’s mindset needs to make a legitimate effort to be metrics driven and put value in the tool you spent so much money on.

If you’re intimidated by it, there are plenty of consultants and trainings that can help.

2. Plan your meals and workouts carefully with a clear goal in mind.

How can you measure progress if you don’t know where you’re going and how you’re going to get there? If our measurement strategy isn’t zeroing in on the things that are key to the business, it needs to be adjusted, but you wont be able to know that without a clear cut plan. Analytics works the same way. Have a clear goal and a strategy as to how you plan to measure your goals. Once again, this might be a daunting task, but that’s what your certified partners are there for!

3. Garbage in equals garbage out.

That doesn’t only apply to your diet, but it applies to your data. If you don’t eat the right food, you wont have the right body. If I don’t enter my calories consumed correctly, I won’t really be able to measure my progress. Similarly, if you don’t measure your digital website or mobile app data correctly, your data may be garbage and thus, your insights may be garbage. The tool needs good food/data to be able to do it’s job correctly. Make sure you’re tracking your data properly, using the correct methods and code. Track the right pages, the right events, and create clean proper funnels and goals.

4. Review your progress.

If I don’t review the data at periodic intervals and adjust my exercise routine as a result, what benefit am I getting out of it? No one get’s it right the first time. It takes optimization. Maybe your diet isn’t right. Maybe your exercises aren’t burning enough calories. Maybe your body has hit a plateau and it’s time to switch things up. Similarly, with analytics, if we’re not reacting to what the data is telling us, then what good is our analytics implementation? Your measurement strategy should include periodic review to see your progress and make the adjustments necessary to truly optimize results of your site. Just as the reports above tell the wearer of the fitness device to move, Analytics reports similarly tell us which marketing campaigns need attention, which landing pages need to be tweaked, what’s working well, and what’s not. In other words, an entire action plan can be derived just by periodic review of key performance indicators.

Conclusion

Yes people, an individual is similar to a business in this sense. While that won’t get you on the Fortune 500 list, it’s still something to ponder :) It’s an interesting comparison, but one that resonated in my mind and helps me apply the concept of “Measure, Analyze, Optimize” we learn in the world of analytics to my daily life as well. The thought did cross my mind that perhaps I should import this data into Tableau and go all nerdy with it, but that would be a bit too over-zealous. I’ll leave that for another day, or maybe I’ll have “a little extra motivation” once I start hitting my goals. :)

One key takeaway from this little lesson I learned: Performance is an attitude, not just a device.

Jul 21
2014

down-is-up
Recently, an issue came to light with one of our clients which turned our world upside down – quite literally.

In the graph (shown below), Unique Pageviews vs. Pageviews was compared for a given date range for a select group of pages.
If you click on the image to zoom in, you’ll notice something weird. For some reason, the line of the Pageviews metric — which is higher in number — is lower visually than the unique pageviews.

What the @#$^ is happening?

pageviews-higher-than-unique-pageviews

The unique pageviews line (the higher of the lines) is graphed according to the y-axis scale on the left. What you probably didn’t notice is the pageviews line (the lower of the two lines) is graphed according to the secondary y-axis on the right. Yes, there is another y-axis on the right side.

Because the scales are different, they’re spatially and visually apples and oranges in terms of height.It’s a bit counter-intuitive and weird, but we thought we’d share this finding with you in case any runs into this issue and get’s confused.

Still confused? That’s ok. At least you know why now :)

Sep 16
2013

hitcallback thumbnailI learned early on in my analytics career that 100% accuracy is not attainable in this business. And while we deal with incomplete and messy data all the time, we always look for ways to improve the quality of data we collect and apply best practices to give marketers more confidence in their analytics reports and optimization efforts.

There could be several reasons your Google Analytics code is not working properly. For example, we sometimes get stuck in a situation where you run into a race condition and you want to be certain that your Google Analytics tracking beacon is sent to servers, especially if you’re tracking an outbound link or form where the thank you page resides on a 3rd party domain, but in a lot of cases, the browser will redirect away from the page before your Google Analytics data can even be registered.

Traditionally, the solution that we’ve seen (and have used ourselves) is to use the JavaScript function setTimeout to create a delay that allows the GA tracking enough time to execute. This is not an ideal solution for several reasons.

Much better is hitCallback. hitCallback is the magical solution you need ensure that the JavaScript executes before the browser leaves the page. In this (technical) post, I’ll share the technique to help you capture key data elements that you might be missing today (and thus improving the quality of your reports).

What the heck is “hitCallback”?

“Callback” is a piece of executable code that is passed as an argument to another function.
So hitCallback is a JavaScript function that is passed as an argument to another Google Analytics method.

ga('send', 'pageview', {'page': '/my-new-page', 'hitCallback': function() {CALLBACK CODE GOES HERE;}});

In the above example, the code is pushing pageview to Google Analytics servers. Once done, it’ll execute whatever code you have in the area bolded. So for example, you can replace the above bolded text with actions like form submission code, etc. to ensure that first your pageview data is sent to GA 100%, ONLY THEN will the form be submitted and redirect the visitor to a thank you page.

Nested Callbacks

You can also utilize hitCallback to control the order of executing your code.
The below example illustrates how to control the order of Google Analytics data beacon transfer to servers. We’ve also added alerts so you can see when each step is executed:

ga('send', 'pageview', {'page': '/vp/page.html, 'hitCallback': function()
       alert('Pageview data has been sent to GA. Anything else?');
       ga('send', 'event', 'Form', 'Submit', { 'hitCallback' : function ()
           alert('Event data has been sent to GA. Anything else?');
           alert('now submitting the form');
           javascript:document.paymentForm.submit();
       }});
  • In the first line we send a virtual pageview and define a callback function where an alert is executed.
  • Then we fire another callback method inside the first callback where we send an event to Google Analytics.
  • Finally we submit the payment form which redirects the user away from the current page.

Is hitCallback for Universal Analytics only?

No! hitCallback can be used for both Universal and traditional Async version of Google Analytics as follows:

_gaq.push(['_set','hitCallback',function() {
    javascript:document.paymentForm.submit(); // Submit underlying form
}]);
_gaq.push(['_trackEvent', 'Form', 'Submit']);

In this example the event will be pushed to GA, and only then will the form will be submitted.

Pinterest: Example of the benefits of hitCallback

pinterest iconLet’s say you have a pinterest button on your website page, and you had planned to track it as both social and an event in Google Analytics. You tagged the button by adding _trackEvent and _trackSocial methods to the onclick of the pinterest button.

onclick="_gaq.push(['_trackEvent', 'Social', 'Pinterest', thislink]);
_gaq.push(['_trackSocial', 'pinterest', 'pin', thislink, document.URL]);"

You expected to see data in your Google Analytics reports but for some reason, you can’t find it. What happened?

The browser redirected your visitors to the pinterest.com before executing trackEvent and trackSocial methods. So both methods were aborted and nothing was sent to the Google Analytics servers.

google-analytics-service-requets

hitCallback solves your problem:

onclick="var thislink = this.href; _gaq.push(['_set','hitCallback',function() { window.location = thislink; }]); _gaq.push(['_trackEvent', 'Social', 'Pinterest', thislink]); _gaq.push(['_trackSocial', 'pinterest', 'pin', thislink, document.URL]); return false;"

This is how the code works:
It stops the “pin it” anchor from auto-redirect by adding “return false;” to the onclick of the anchor.
window.location is the callback method that will redirect after sending data packets to Google Analytics Servers.

Conclusion

You could be getting form submissions or pins, but not measuring your data accurately. How do you know where to optimize? But now, you can ensure everything is tracked properly and executed in the correct order, so your reports are precise.

Other scenarios you have and you’d like to share? We love to hear your feedback

Jan 25
2013
Google Analytics is a powerful tool.

There are so many screens, features, tools, filters, searches, etc. For the heavy data cruncher, it’s always nice to have a set of shortcuts for quick execution of common tasks. In case you couldn’t find it on the Google Analytics Blog, we laid them out for you.

Here are a list of keyboard shortcuts in Google Analytics:

Google Analytics Keyboard Shortcuts

Date Range Shortcuts

d t Set date range to TODAY
d y Set date range to YESTERDAY
d w Set date range to LAST WEEK
d m Set date range to LAST MONTH
d c Toggle date comparison mode (to the previous period of whatever you are looking at.
Example, if you’re looking at 6 days, this will compare it to the 6 days before it)
d x Toggle date comparison mode (to the previous year of the period you are looking at)

Application Shortcuts

? Open keyboard shortcut help
h Search help center
a open account panel
shift + a Go to account list
s / Search reports
shift + d Go to the default dashboard of the current profile

Need Help With Google Analytics? Click Here
Some of them not working? If you’re a genius like me, it’s probably because you pressed one of the keys on accident and it took you to the search box. Make sure you are out of the search box when you try these.