Deep Dive Articles For The Data Export API

Friday, September 03, 2010 | 10:36 AM

Labels:

On the Google Analytics API Team, we’re fascinated with what people create using the Data Export API. You guys come up with some really amazing stuff! Lately, we’ve also been paying a lot of attention to how people use it. We looked at whether the API has stumbling points (and where they are), what common features every developer wants in their GA applications, and what tricky areas need deeper explanations than we can give by replying to posts in our discussion group.

As a result of identifying these areas, we’ve written a few in-depth articles. Each article is meant as a “Deep Dive” into a specific topic, and is paired with open-source, sample reference code.

In no particular order, the articles are as follows:

Visualizing Google Analytics Data with Google Chart Tools
This article describes how you can use JavaScript to pull data from the Export API to dynamically create and embed chart images in a web page. To do this, it shows you how to use the Data Export API and Google Chart Tools to create visualizations of your Google Analytics Data.

Outputting Data from the Data Export API to CSV Format
If you use Google Analytics, chances are that your data eventually makes its way into a spreadsheet. This article shows you how to automate all the manual work by printing data from the Data Export API in CSV, the most ubiquitous file format for table data.

Filling in Missing Values In Date Requests
If you want to request data displayed over a time series, you will find that there might be missing dates in your series requests. When requesting multiple dimensions, the Data Export API only returns entries for dates that have collected data. This can lead to missing dates in a time series, but this article describes how to fill in these missing dates.


We think this article format makes for a perfect jumping off point. Download the code, follow along in the article, and when you’re done absorbing the material, treat the code as a starting point and hack away to see what you can come up with!

And if you’ve got some more ideas for areas you’d like us to expound upon, let us know!


Back-to-Basics: How much mobile traffic do you get?

Wednesday, September 01, 2010 | 9:36 AM

More and more people are surfing the Internet from their phones these days. Take a look at the following graph. It shows the number of monthly visits to googlestore.com from Android, iPhone, and BlackBerry devices over the past 2 years. There were 277 visits in Sep, 2008. But in July of 2010, there were over 13,000 visits!










Given this kind of growth, it makes sense for many businesses to set up a mobile device-friendly site. If you’ve been considering whether to create a mobile site, you may want to check out the Mobile Devices report in the Visitors section. You can see how many visits you received from each mobile operating system, how many pages they visit on average, how much time they spend on your site, as well as see conversion and ecommerce information.































In next week’s Back to Basics, I’ll show you how to create your own trend graph like the one in this article, so you can really dig into the numbers for your own site.


New Tools to Debug Your Tracking Code

Wednesday, August 25, 2010 | 2:50 PM

Labels: ,

Raise your hand if any of this sounds familiar to you:

  • You just set up your tracking code and you're wondering if it's correct--and you want to know right now.
  • You have decided to migrate your tracking to the new asynchronous syntax--but you want to know if your syntax has any errors.
  • You finally decided to customize the tracking code for cross-domain tracking--but you're worried that you might break your tracking.
  • You want to make sure that your campaign is set up to the correct goal.
Enter: The Google Analytics Tracking Code Debugger and a new debug version of our JavaScript code.

The Google Analytics team has launched a debugging version of the Analytics Tracking code called ga_debug.js to verify your tracking code setup. To make it even simpler, we also created a Chrome extension which uses the ga_debug.js script, which allows you to use the new ga_debug.js without re-tagagging any of your content. You can also use this extension to verify what information is sent to Analytics with each page.

How does it work? First, the ga_debug.js script provides a testing version of the tracking code which will print common syntax errors and tracking analysis messages to the browser’s JavaScript console. Secondly, the Chrome extension which automatically enables your page to use the debug version of the JavaScript without any need for you to retag or recode your pages.

How do you use it? The most simple thing to do is to download the Tracking Code Debugger extension for your Chrome browser. Next, turn on the extension by clicking on the icon to the right of the address bar on Chrome.

Finally, visit a page that contains the tracking code you want to test and open up the Chrome JavaScript console to see the messages (detailed instructions). That's it!

If you want to go use ga_debug.js without the Chrome extension, read all about how to do this in our newly revised Troubleshooting Guide on Google Code. You can use the script on your testing environment to verify extensive tracking code changes. Make sure, however, that you don't use this version of the tracking code on your production website--the script is meant for debugging and analysis, not speed, so you should always use this as a testing mechanism only. If you want to learn more about the kinds of errors this script can help you find, see Common Tracking Code Errors/Typos in our Troubleshooting Guide. While the ga_debug.js script doesn’t catch all possible errors yet, we think it’s off to a great start and will get even better over time.

Happy testing!

Brian Kuhn on behalf of the Analytics Team

Back to Basics: Fast Segments with Analytics Intelligence

| 9:30 AM

Labels: ,

Did you know that there’s a quick way to create advanced segments from automatic alerts? This is one of those “I can’t believe how powerful this is and yet so easy to do” features. Let me illustrate with an example from the Google Store site. A few months ago, on February 5, the Google Store received a surge of traffic from TechCrunch.com. We would not have noticed this extra traffic were it not for Analytics Intelligence. In the following screenshot, you can see that the store ordinarily receives between 0 and 221 visits from TechCrunch, but on this day, it received 1,918 visits.










What happened was that TechCrunch ran an article about Google scarves that were being sold in the store. But, here’s the tip I want to share with you. First, you can graph just the
relevant traffic simply by clicking the button on the alert.





And, you can create an advanced segment just by clicking the Create Segment link at the far right of the alert.







Now you can compare this traffic side by side with overall site traffic or with traffic from other segments. Check out this video to see how this works and to learn more automatic alert tips.

Posted by Alden DeSoto, Google Analytics Team

Introducing Weighted Sort

Tuesday, August 24, 2010 | 2:34 PM

Labels: ,

Have you ever sorted a report by bounce rate and seen nothing but entries with a 100% bounce rate? Have you then noticed that these entries only have 1 visit? Not only is this useless and frustrating, but it obscures the real data points that you care about behind pages of garbage.

Well fret no more! We are pleased to announce a new sorting algorithm called weighted sort. Now when you sort on a computed metric, you can weight that sort by the number of data points, bringing you the most interesting and actionable rows first. For instance, in our example weighted sort will weight the computed value bounce rate by the number of visits. Let's take a look at some screen shots that will make this effect more obvious.

New Verification Integration With Asynch

Monday, August 23, 2010 | 8:35 PM

Nobody likes to duplicate effort. Unfortunately, sometimes it's a fact of life. If you want to use Google Analytics, you need to add a JavaScript tracking code to your pages. When you're ready to verify ownership of your site in other Google products (such as Webmaster Tools), you have to add a meta tag, HTML file or DNS record to your site. They're very similar tasks, but also completely independent. Until today.

You can now use a Google Analytics JavaScript snippet to verify ownership of your website, which is the start of using the rich information about your organic ranking and organic traffic available in Webmaster Tools. If you already have Google Analytics set up, verifying ownership is as simple as clicking a button.

This only works with the newer asynchronous Analytics JavaScript, so if you haven't migrated yet, now is a great time. If you haven't set up Google Analytics or verified yet, go ahead and set up Google Analytics first, then come verify ownership of your site. It'll save you a little time — who doesn't like that? Just as with all of Google Webmaster Tools' other verification methods, the Google Analytics JavaScript needs to stay in place on your site, or your verification will expire. You also need to remain an administrator on the Google Analytics account associated with the JavaScript snippet.

Don't forget that once you've verified ownership, you can add other verified owners in Webmaster Tools (not Google Analytics) quickly and easily through the Verification Details page. There's no need for each owner to manually verify ownership. More effort and time saved!

Webmaster Central has also introduced an improved interface for verification. The new verification page gives you more information about each verification method. In some cases, we can now provide detailed instructions about how to complete verification with your specific domain registrar or provider. If your provider is included, there's no need to dig through their documentation to figure out how to add a verification DNS record — the new interface will walk you through it.

The time you save using these new verification features might not be enough to let you take up a new hobby, but we hope it makes the verification process a little bit more pleasant. Please visit the Webmaster Help Forum if you have any questions. And much thanks to the Webmaster Central team for launching this feature. If you're not already, make sure to read their informative blog. It's a must for any site owner.

A Better Developer Doc Experience

Friday, August 20, 2010 | 10:50 AM

Labels:

Now that the excitement of the new Management API launch has just passed its zenith, you might have also noticed that there were some interesting changes to the Analytics for Developer pages on Google Code.

Since Nick, Alex, and I were under the hood making docs and sample code for the Management API, it also seemed like a good time to spiff up the site and add some structure to handle this burgeoning developer resource.

New Look and Feel
Nick went to town on our new home page. If you attended his talk at the Google I/O conference this May, you might notice that the Analytics data model diagram has reappeared, but this time as a gateway into the key parts of our documentation on Google Code. We surfaced the most important links to provide deep access to the key parts of each section of the site.

New Landing Pages
Since we now have 3+ major sections on our site, it was time to provide landing pages for all the news and updates relevant to Tracking Code configuration, Management API, and Export API. Here you will always be able to see the latest release news and best practice guides for each API without having to dig down into the site.

We’ve also redesigned our navigation bar to be more visually appealing and consistent across all three APIs.

New Groups Pages
We have three major developer groups to help you out with your Analytics coding--Async tracking, Management API, and Export API. Not only that, but our general Help Forum is great for issues with general tracking topics. Since we have so many different groups, we created a new groups landing page to help you figure out which group will help you best.

Our Management API and Export API groups use the new Google Discussion Forum, which is embedded right in the page--a pretty nifty feature.

We hope that you find the new design makes it clearer and easier for you to find what you need for Analytics development. We’d love to hear your feedback, so please post any comments on one of our developer groups pages and let us know.

Patricia Boswell on behalf of the Analytics API team.