Kamis, 24 Februari 2011

Mastering Unique Visitors in the API

After launching a massive amount of new data through our Data Export API, our developers gave us a lot of great feedback back and support. Thanks! Now we want to show you how to master this data to make better business decisions, starting with the unique visitors metric.

In this blog post, we ask Analytics team members to give us their favorite ways to request and use unique visitor data. Next, we translate that into an API query along with screen shots of how the data looks. Finally, we give you a deep link to the query explorer tool so you can make that same API request with your own data right now. Let's Go!

(Note: You can do most of these queries using Custom Reports through the Google Analytics web interface.)

Query example #1: Measuring Total Unique Visitors
Before we start using suggested queries, let's lay the ground work with a very simple query for unique visitors.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&metrics=ga:visitors
&start-date=2011-01-01
&end-date=2011-01-31

This query retrieves the total unique visitors to our site for the month of January.

Here’s a sample screen shot of the results.

You can click this link to execute this query with your own data. Simple!

Query example #2: Monthly, Weekly, and Daily Unique Visitors

Ok, the query above was easy. So maybe we want to know how many of these users are active users. Hetal Thakkar, the engineer who implemented the processing logic for this metric, says it’s easy with the following query:

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&dimensions=ga:week
&metrics=ga:visitors
&start-date=2011-01-02
&end-date=2011-02-12

Awesome Hetal! All we need to do is add the ga:week time dimension to get weekly unique visitors or as we say at Google, “7-day actives.”



In fact, you can measure active users for other time periods by using ga:year, ga:month, ga:day or even ga:hour instead. This gives you the measure of what advertisers call “reach.”

Query example #3: Hourly Unique Visitors by City

Recently an agency wanted to understand how many unique visitors would visit their site after airing a TV commercial. They exported hourly unique visitors by region, and ran some additional statistical analysis.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&dimensions=ga:region,ga:city,ga:hour
&metrics=ga:visitors
&filters=ga:region==California
&sort=ga:region,ga:city,ga:hour
&start-date=2011-01-01
&end-date=2011-01-01
&max-results=50

Here we use both the ga:region and ga:city dimensions to get the number of unique visitor by city. Even though we use a filter to only get data from California, we add the region dimension to make the report easier to read. We then use ga:hour to get hourly unique visitors by city. Since the TV ads were only running in California, we use the filters parameter to filter by region. We also limit the date range to the day the ad ran.

Here are a few results from Alameda, California.

Now you are ready to analyze the online impact of your offline campaigns, such as radio and TV.

You can apply the unique visitors metric to almost any existing report to get amazing new insights.

Query Example #4: Mobile Unique Visitors By Country

Ivanna Kartarahardja is a software engineer on the Google Analytics API team. She did a lot of the coding to make this data available through the API. Thank you Ivanna!

One of her favorite reports is looking at mobile unique visitors by country.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&dimensions=ga:country
&metrics=ga:visitors
&segment=dynamic::ga:isMobile==Yes
&filters=ga:subContinent==Western%20Europe
&sort=ga:country
&start-date=2011-01-01
&end-date=2011-01-15
&max-results=50

In this query we use a dynamic advanced segment to only query users who have come from a mobile device. We also added a filter to only look for mobile traffic from Western Europe.


See your own data in the Query Explorer

This report is also very useful if you are trying to measure the performance of your mobile application using either our Google Analytics Andriod SDK or iOS SDK. Metrics like this help you decide which languages and regions to invest in.

Query Example #5: nique Visitors by Mobile Device

Jeetendra Soneja is the Lead Engineer for the Google Analytics APIs. His favorite report is to look at mobile unique visitors by platform. He thinks this is a great way to identify which platforms to invest resources into.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&dimensions=ga:operatingSystem
&metrics=ga:visitors
&segment=dynamic::ga:isMobile==Yes
&sort=-ga:visitors
&start-date=2011-01-01
&end-date=2011-01-15
&max-results=50


See your own data in the Query Explorer

Notice how in the last two queries we’re using a dynamic advanced segment to only look at a specific segment of all users (dynamic::ga:isMobile==Yes). We can then apply any of our useful dimensions to gain more insight about those specific users.

Query Example #6: Measuring Site Loyalty

Sagnik Nandy oversees data processing for Google Analytics. You met him in Web Analytics TV #16, and he always has clever tricks on how to build complex queries. He likes using visit count to measure site loyalty.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&metrics=ga:visitors
&segment=dynamic::ga:visitCount=~^[4-9]
&start-date=2011-01-01
&end-date=2011-01-31
&max-results=50

Here we will get back the number of visitors that have visited the sites between 4 and 9 times resulting in a custom loyalty report. Since ga:visitCount* is a dimension, which is a string, we use a regular expression to match all values between 4 and 9.

*In this query segment, a visitor that visits the site 5 times will only have his/her 4th and 5th sessions included, but not the 1st to 3rd sessions (More documentation on ga:visitCount).

See your own data in the Query Explorer

Query Example #7: Visitor Based Conversion Rate

Avinash Kaushik is the Analytics Evangelist at Google. He has a best selling book about web analytics, and a great use case. Google Analytics uses session-based metrics for most of its performance calculations. For example, conversion rate = conversions / visits. Most unique visitors will not convert every time they come to your site. So sometimes it might be better to calculate conversion rate as conversions / visitors.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&dimensions=ga:source
&metrics=ga:visitors,ga:goalCompletionsAll
&filters=ga:medium==organic
&sort=-ga:visitors
&start-date=2011-01-01
&end-date=2011-01-15
&max-results=5

Here we look at the top organic search engines, but now let’s request the goalCompletionsAll metric. Of course, you can easily use any of the 20 individual goals, the number of transactions or events, or the total revenue for this calculation if you prefer.


See your own data in the Query Explorer

By now you should see you can get unique visitors for almost any dimension in Google Analytics!

Query Example #8: Visitor Loyalty Per Content Section

Patricia Boswell is the lead of our documentation efforts for Google Analytics. Measuring performance of the content that is produced is very important to her. She likes to use the unique visitors metric to report the number of unique visitors who visit a specific content section of the site. She then compares that to the number of unique pageviews to get a sense of how frequently unique visitors are viewing specific set of pages.

https://www.google.com/analytics/feeds/data
?ids=<tableId>
&metrics=ga:visitors,ga:uniquePageviews
&filters=ga:pagePath=~product
&start-date=2011-01-01
&end-date=2011-01-15

Here we apply a filter which uses a regular expression to match any pages that have the word “product” in their URL. Using the advanced segment returns all sessions, which had at least one pageview that included the word “product.” Google Analytics then returns the number of unique visitors for those sessions.



So if we divide unique pageviews (276) by unique visitors (249), we get 1.10, which is the frequency that unique visitors visit a product page.

Let’s compare this to frequency of unique visitors visiting our support section. All we do is change the query to filter the ga:pagePath dimension on the word “support.”

&filters=ga:pagePath=~support

And we get:


We see here that the pageviews per visitor ratio for the support section is 2.85 (= 342/120).

So while more unique visitors saw the product pages, unique visitors were more engaged on the support section. This might influence your content development strategy by considering cross selling products and services within the content section vs the product section.

See your own data in the Query Explorer

Your Turn!

With the addition of unique visitors to the API, you can gain even more insight about your customers. We encourage you to democratize your data by sharing this article with colleagues and friends. Also we’d love to hear your best use cases for using unique visitors in the comments section below. Thanks!

Selasa, 22 Februari 2011

New Features For iOS/iPhone SDK

Back in December, we brought you custom variables for your Android applications. Today,
we’re doing the same for our iOS SDK by releasing version 1.1 of the Google Analytics SDK for iPhone with Custom Variable support. We are also offering a NoThumb version of this SDK.

Custom variables can be used to segment your users and provide actionable context. Some great use cases are:
  • Free vs paid: What percentage of users prefer a paid app vs. a free app that delivers ads? Are you making more money on the free version or the paid version?
  • Installs by version: What version of your app gained the most users? What version lost users? How quickly are users upgrading?
  • Portrait vs. landscape: Do your users prefer to use your application in portrait mode or landscape mode?
For more great ways to use Custom variables in mobile applications, check out Alex Lucas’ great blog post for the Andriod SDK.

In addition, we are providing support for NoThumb with our SDK. We have a NoThumb version of the library as well as the standard, Thumb version. This NoThumb version is available for developers that need the Thumb instruction set disabled in their applications.

Selasa, 15 Februari 2011

Happy Valentine's Day

As this author thinks about what to get his significant other for Valentine's Day (a little late), he reflects on the myriad of businesses that have improved their game with Google Analytics, including the following example recently highlighted on The JAPAC Conversion Room Blog by our very own Vinoaj Vijeyakumaar, Senior Conversion Specialist, Google Southeast Asia. If only Vinny had told me about this earlier so I could've been ready for Valentine's Day: online shoe retailer Shoes of Prey, where you or your honey can custom-design a pair of women's shoes and Shoes of Prey will make it and send it to you. So fun! Sweeter than chocolates, and cooler than flowers for sure. And the great thing is, they're using a combination of Google Analytics and their Intelligence Alerts to keep tabs on which blogs and websites are writing about them. (Just like you keep track of the love notes that you're sweetie sends you.) Check out their technique:

As a newly-formed startup, Shoes of Prey rely heavily on positive buzz about their products, so staying up-to-date on these sites is crucial. One of the ways they keeps up with online buzz is by regularly checking their traffic sources and Google Analytics Intelligence Alerts to see which blogs are sending them the most valuable converting traffic. They constantly monitor the Intelligence Alerts reports to look for unusual spikes in overnight traffic from referring sites. Since the web moves at light speed, Shoes of Prey wants to ensure that they are speaking to people writing about them as soon as they publish and not a week or two later.

Check out more specifics over at post on the JAPAC Conversion Room Blog to learn more about how Shoes of Prey took advantage of the insights gleaned through Intelligence Alerts to increase traffic to and sales on their site.

About Intelligence Alerts: For the time-poor analyst, Google Analytics Intelligence Alerts are as good as having a personal assistant. Analytics Intelligence constantly monitors your website's traffic. Anytime your traffic patterns change significantly, such as a dip in traffic from a particular country, it adds an automatic alert to your Intelligence reports.

Happy Valentine's Day!

Posted by Jeff Gillis, Google Analytics Team and Vinoaj Vijeyakumaar, Senior Conversion Specialist, Google Southeast Asia

Jumat, 04 Februari 2011

Web Analytics TV #16 - Goals and ECommerce Tracking Edition

Welcome to our first Web Analytics TV episode of 2011!

Web Analytics TV is powered by your questions, in this episode we had questions from Australia, India, Russia, Germany, Israel, Poland, Argentina, Dubai, Cyprus and so many other places. It is amazing to see such an engaged audience from around the world. You all rock!
Our process is simple. Step 1: You ask, or vote on, your favorite web analytics questions via the Google Analytics Google Moderator site. Step 2: From a secret undisclosed location at the Googleplex Avinash Kaushik and Nick Mihailovski answer them. : )


In this episode our special guest is Sagnik Nandy, Engineering Lead for the Google Analytics back-end team. We are also thrilled to present Alan from Vancouver with the “Analytics Ninja of the Episode” award for his excellent question about sampling in Google Analytics. Alan, just send us an email and we’ll send you an autographed, personalized, copy of Web Analytics 2.0.

Here is the list of last weeks questions.


In this action packed episode we discuss:
  • (0:34) Detecting new local search engines in Google Analytics
  • (1:11) Effects of browser Do Not Track features on Google Analytics
  • (2:50) Is there anything you can do to reduce sampling in reports
  • (4:56) Measuring visitors who have visited one page for more than 30s
  • (5:50) Is passing a random visitor id in a visitor level custom var allowed?
  • (7:03) Tracking Google Places paid ad referrals
  • (8:18) Using jQuery to track outbound links
  • (9:18) Ways to filter or segment on the day of week
  • (10:05) When will Google Analytics work on devices that don’t support Flash
  • (11:06) How to track e-commerce and goals that happen on a 3rd party site
  • (12:37) Unique visitor metrics now available through the API
  • (14:38) Tracking Ecommerce transactions in one web property in different profiles
  • (15:45) Is it OK to track the name and email address with Google Analytics
  • (16:23) Can you use events to track outbound links on your site





Here are the links to the topics we discuss:
As always, if you need help setting up Google Analytics or leveraging the advanced configuration options, we recommend hiring a Google Analytics Certified Partner.

If you found this post or video helpful, we'd love to hear your comments. Please share them via the comment form below.


This series would not be possible without your awesome questions. Please submit them on our public Google Moderator site, and while you are there don’t forget to vote for your favourite questions. Avinash and Nick will answer them in a couple of weeks with yet another entertaining video.


Thanks!
Posted by Nick Mihailovski, Google Analytics Team