Tip:
Highlight text to annotate it
X
Nick>>: Are we ready? All right. All right, thanks everybody for waiting. I know the keynote
was, went a little bit longer. So they said that we can take our full hour. So we're gonna
go through the presentation here, ask questions. We really want to make this a interactive
over Wave.
So, there's this URL here, there's gonna be a lot of content that I'm gonna be presenting
today. If you have questions, we have a lot of people who are gonna be answering the questions
online. And then we'll go back up and I'll ask the questions as well.
So my name is Nick Mihailovski. I’m a lead on our Developer Relations for Google Analytics.
I've been, I was actually at Urchin Software and I've been working on Google Analytics
for five years. We're really excited to talk about a lot of things that we're doing here
for developers. This is our first year at Google I/O, even though we've, we've had Analytics
out for five years.
So just, just to give a show of hands, how many people here use Google Analytics today?
All right, everybody uses it. Okay. So, so a show of hands again, how many people feel
like they use it in very sophisticated ways? Like you, you guys think you're doing a lot
and you're getting a lot of information out of it? Okay, it's a lot fewer hands. Great.
Well, you know, we heard earlier today in the keynote. We heard Vic Gundotra talking
about how important Analytics is. We heard Eric talking about Analytics as well. And
measuring the performance of your applications is critical for you to be successful in your
business.
Now, traditionally in most presentations we talk about the business side of how to use
data, but here at Google I/O we're really reaching out to developers. So I'm gonna talk
you, talk to you a little bit about what we're doing with the platform, what we're building
to enable developers like you to do really exciting new things that you've never been
able to do before.
[ pause ]
So when we look at what are we really want people to do with Analytics. There's really
three areas. And I'm gonna talk through you today throughout the presentation of what
we're doing around this.
Developers really want to know exactly what data Google Analytics collects. How we process
the data so they can interpret what is actually going on in the reports that we show them.
Developers want to take our code and extend it to new environments like TV and mobile,
as well as extend our reports so you can do amazing, better, badder and exciting visualizations
with the data you've never been able to do before.
And finally, developers want to take the data that you can get out of Analytics, take the
Web Analytics data and integrate that with their Business Analytics data to get new insights
and do innovative new things that again, we've never been able to do before. This presentation's
gonna walk you through how we're actually accomplishing that today.
So when most people think of Google Analytics they think of just signing up for a brand
new account, getting a piece of tracking code that they slapped on the, the footer of their
page and automagically you see really pretty reports. And I'm sure everybody here has gone
through that because you pretty much all raised your hand when I said how many people use
Google Analytics.
So I want you today to not just think of that. I want you to think today of four major components
that we have: a core processing component, a management component, a data collection
component and a data exporting component. These are the four main components. And we're
gonna talk through exactly how we're enabling developers to integrate through each of these
pieces.
So how many of you have seen pages and visits data in your reports? All right. So how many
of you actually know how we calculate those metrics? All right [ laughter ]. Sort of,
right?
So the truth of the matter is businesses today are using this data to justify the success
of what they're doing online. But in truth, very few people actually know how we're calculating
this information. And for developers that's really frustrating, because what you're trying
to do is guess all the time of what's going on and you're sending this data and you're
seeing these results that you're really not sure how they got there. And it's just really
So today I'm gonna give you a sneak peek. We're gonna pull back the curtain of what
we've always hidden of our core processing engine. And we're gonna tell you exactly how
Google Analytics collects data. I'm gonna talk about a brand new model that we're just
gonna start just touching on, on how we calculate all the data. And it's gonna be really exciting
because once you understand this it's gonna make you understand how Analytics works.
So when you log into your reports you typically see a report that just looks like this. This
can be broken down into a series of dimensions and metrics. Where metrics are numeric values,
for example like the number of pages. And dimensions are a set of strings, for example
like the page path. Now Google Analytics has a ton of these metrics, over 175 metrics that
we expose.
But again, we don't really tell you how we calculate them. You just look at the reports.
You say we increase page views after we've released the brand new product. Everybody's
successful. They go to the bar and celebrate. But we're really not sure what those page
views really mean.
So let's blow off the covers. Let's talk about how Google Analytics works today. Here are
four main components. When you log into Analytics for the first time you get a piece of tracking
code in the management section, which you then put on your site and it sends this data
in which you can think of as logs. We then take all the configuration information from
your account, your goal configuration, your profile information. And we put that into
a data structure. And this is where the magic happens. We take
all these data structures and pass them through a series of functions where the return value
of each function is the actual dimension of the metric. This then gets stored in a table.
And this processing happens 24 hours a day, 7 days a week all the time. We were just laughing
yesterday at lunch. We were saying how many times are we processing and collecting all
the data from the people at Google I/O. Probably a lot.
So when you wake up tomorrow morning and you look at your reports after the announcements
you've made here, you, you'll log into your reports or User Data Export API. You'll query
your back end and you'll get a set of reports. And the key thing here to know, that the main
processing part is that where you're using functions in each dimension and metric can
be defined as a, as a actual function. And that's it. I mean, isn't that easy? There's
just six steps to all the data that we're processing.
So let's take a, a look through exactly how this works in a little bit more detail. What
we first want to understand is for all the data that we're processing, what is this data
we're actually looking at. And you could think of it as a simple visitor interaction model
where a visit, visitor visits a site and views a bunch of pages. They might revisit the site
and view a couple more pages, interact with content-like events or actually make transactions
on your site. In Google Analytics we call this the visitor session and hit levels.
Now, when a visitor visits a site that's being tracked with GA, with the JavaScript tracking
code, each time you make a tracking request an invisible 1x1 pixel image sends data to
Google Analytics. Now, all the tracking library's doing is putting a bunch of query parameters
at the end of this request. And as a visitor comes to your site you'll see the queries
being sent. And over time multiple queries are being sent as well.
Now, our tracking code has logic that persists certain values across each of these requests
to represent the visitor, the session and the hit. Now your site sits on the World Wide
Web, and so people are coming to it from exotic places, places like Zanzibar, Bahrain. They're
sending logs all the time. And so from our side we just see a series of these requests
all out of order.
So our back end goes and reconstructs the sessions and the hits based upon the values
that we persisted in the tracking code. Now, you could think of this as a session entity
with an array of hits. Google Analytics will then go through each session, and through
each hit within each session, and pass the session in the index of each hit to the series
of functions that calculates dimensions and metrics.
Let's take a look at how visits are calculated. Now, at the bottom we have four hits that
were created for a session. A visitor came to the page foo and then went to page bar,
they then did an e-commerce transaction, and finally they went back to page foo.
So what we do is we pass this whole session entity with each index, and we pass it to
this function called visits. If the index is 0 we return 1, otherwise we return 0. And
so in the example below, we count 1 for all these hits. What that means is visits count
the number of session in Google Analytics. And that's exactly what we're doing.
Let's take a look at how we calculate dimensions. Now, dimensions are strings like a, I told
you earlier. Here across all the pages when we pass it to this function we index into
the hit. And there's a type called page. And if there, if we hit a page we actually return
the page path foo, bar or foo. Otherwise we return an empty string. So for each dimension
and metric the key part is that there's a function that can be applied that explains
exactly how that data's calculated.
If you think back you could say hey, well then there's probably a parameter in the queries
that are being sent through our utm.gif request. And that query's value is being set by a certain
parameter in the browser, the URL. We think this new model is really important because
it's gonna explain exactly how the data's being calculated, how it's being transmitted
and you'll be able to interpret your reports much more cleaner than you currently can today.
Now that's all I'm gonna be talking about functions, just a real sneak peek. If you
have more questions now is a great time to go to the Google Wave and we'll answer them
after this session, after I'm done talking. [ pause ]
So we just talked a lot about what we're doing. Now I want to talk about you. What are we
doing for developers? We just talked about this really powerful processing engine that
we're uncovering and telling you how it's working. How are you gonna integrate with
that today? Well, across our four main components we're exposing a set of data fields that you
can send us information. We're exposing a set of protocols that you can send and export
your data. And we have a bunch of client libraries that make it really simple for you to track.
I'm gonna over this section really fast. All of this data you probably already read on
code.google.com/apis/analytics. You can go there and, and learn more about it. But I
just wanted to show you how powerful this is, especially around the data collection.
Here are all the types of data that you can collect. Standard page views, event. We, we
just released custom variables that, which allow you to explain this information. All
the data gets sent over the utm.gif request, what we just looked at.
What I really want to focus on is how many client libraries that we have today. Most
of you just think of the JavaScript tracking code. We recently released the new hotlist
to track the Android applications. So all this stuff that Vic Gundotra talked about
how exciting it is to build apps, you guys need to measure how successful your apps are
to make them better. You can use Google Analytics to do that today.
We released new codes so you can track mobile websites that don't enable JavaScript for
older WAP phones. So if you're targeting Asian audiences or, or markets where they don't
really have the smartphone technology yet, you can still track that with Analytics.
We heard in the keynote that, where Google is really embracing Flash. We actually worked
with Adobe two years ago to build a complete tracking library for all Flash, that's native
to ActionScript 3.0. It works in Flex, Flash, Air. We even work with Microsoft to, to, to
track Silverlight if you so choose to. A lot of libraries. Most people don’t know how
much you can actually use Analytics.
Let's take a look at account management. Now this is the part that has all the configuration
data in Google Analytics. This is really important if you want to make sure that your account's
configured. You're provided an API to export all this information. It's currently read-only.
We actually just, for all the libraries we just released updates to the .net library
so if you're a, a big .net shop you can start using that. And we have three user contributed
libraries for Ruby, Pearl and PHP. Now there's, they're really powerful. There's some people
that have been doing some amazing visualizations using the Ruby library just because it's so
simple.
Now, the real exciting part is being able to access all your data. So for that we have
a Data Export API that exposes dimensions and metrics. We just talked about how all
of those are calculated. But what's really interesting is the protocol that we're using
to do this. The protocol uses Google data. And the query language to access all your
data is very rich. You pretty much have access to about 90% of all the data in your reports.
And it's so simple. You can make exotic queries, for example, like show me the number of visits
who spend more than five minutes, who come from Nepal, who bought blue swimming trunks
for more than a hundred dollars. Now, I don't really know who in Nepal buys swimming trunks
that are very expensive, but if they do you can query for it and find it out in your own
reports.
Now, I'm just going to quickly show you a quick demo on exactly how powerful our query
language is. If you go on our code site we provide a simple tool called a Query Explorer.
Here's our code section. You can see it's code.google.com/apis/analytics. It's over
here under the feed reference in the Query Explorer.
And you guys can log into this right now and play around with it. Everything has, there's
nice drill downs that show me all the accounts that I have. There's information of all the
queries we have. We have all our metrics here and you can see all the information.
Let's just start looking at a couple queries to show you what we can do. So let's just
quickly look at visits. Here we're gonna quickly get the data. There it is. That's how much
visits we're getting to the Google store for the period of May 6 through May 20.
Now let's add a dimension to that. Let's take a look at the number of the different cities
across the globe. Here we're looking at dimensions and metrics for all the different cities.
Now we could specify different filters. Let's say we want to say, we want to say the country
equals, let's see, the country has a regular expression that it starts with united.
[ pause ]
>>Nick: Here we're getting a list of all the cities in the United States. And the filter
expression we can use an n, we could say show me all the cities that are, or the city is
California.
[ pause ]
>>Nick: Oop.
[ pause ]
>>Nick: [ Laughs ] You're right. [ Audience laughs ]. [ Laughs ] Oop. All right.
>> [ inaudible ].
>>Nick: All right. So we'll say city. [ Everybody laughs ] We're really agile, we'll, we'll
mix up the example over here. It starts with M. Okay. So, here's all our countries that
start with United, where the city starts with M. Let's now take a look at, maybe we want
to do this by, we want to take a look at the different keywords. We could jump under here
and take a look at keyword.
[ pause ]
>>Nick: Here's all the different keywords. Maybe we want to take a look at the segment
and only look at new visitors. Let's get that data.
[ pause ]
>Nick: And so what the, there it is. And here we're looking at new visits. And then we could
come in here, we can say, maybe we want to sort by visits, descending. So you get the
picture here. You can play with all your data. This tool is available. It's really simple
to use, and it just really shows you the power of how quickly you can get access to all your
data, how you can display it in new ways and really have a, a quick way to, to start analyzing
your data in, in new environments.
[ pause ]
>Nick: So if you have any questions about our platform and the core pieces of what we're
providing please ask them on Wave, or ask them after the question. Again, we just want
to spend a short time. All this information, you probably have already read it. If you
haven't, you should go read it after, after this session.
So now I want to talk about what we're enabling developers on it, what they can start building
on this platform that we're building around our core processing engine. So most people
use Google Analytics to collect data so they can analyze, make changes to their site and
--perfor, perfor-- improve the performance of what their website's doing today.
Now, when most people do that they start running into issues like there's too much data, they
don't have enough time and finally for the people who are able to actually great, get
great insights and make changes and improvements, that process really doesn't scale well. So
what if you could build a program that automatically improves the performance for you?
This example will teach you exactly how to do that using the GA platform. So let's take
a example of a list of links. Here's somebody who has a site map on their page. And they,
they've organized them into some categories. But are these really the best way to order
this list of links? Who knows? This is more of a gut feeling.
Now, people are coming to this site every day. They're clicking on the links of what
interests them, what interests them the most. So how about we use Google Analytics to track
the number of time people click on each of these links, and then order them into something
that will be a lot more relevant than they are today.
This example will demonstrate exactly how to do that. Now, from a technical example,
from a technical perspective, what this example is really showing you is how you can integrate
Google Analytics with your content management, e-commerce platform, with your business intelligence
information. By passing in a common set of IDs into Google Analytics, and then exporting
all the performance data by those IDs so you can do amazing new things with them that you
couldn't have done before.
Let's take a look at how a content management would, site would display a set of links on
a, a bunch of pages. Now you guys are all really advanced developers at Google I/O,
so we're not gonna show you the actual code to do this. But simply, there's a table that
has link URLs in text.
Each of them have a primary key. Your content management issues a SQL query that gets all
the data and displays a list of links on the pages.
Now for the purpose of this example, the most important part is that the primary key is
being passed and set in the name attribute of each link. That way when we track it later
on we'll have that ID and we can pass it into Google Analytics.
So I have PHP running here with a, with a MySQL database that I'm creating a list of
links here on the site. You can take a look at the source. Here's our name attribute that
has the ID which is our primary key on our database. And they're just a bunch of listed
links. Pretty simple.
[ pause ]
>>Nick: So let's take a look at how we'll pass that information into Google Analytics
and how we start tracking. So here's our list of links that we looked at before. [ Clears
throat ] And there's three steps that we're gonna do. We're gonna implement the tracking
code. We're gonna use, set this ID in what we call a custom variable, and we're gonna
pass that data to Analytics using an event.
Let's take a look at the code and see exactly how that works. So the first part of the code,
and here, here you can see just the top file. The first part of the code is just imp, implementing
the tracking code. Now, we recently released something called asynchronous tracking.
Now, Google is obsessed with making the Web faster. And so the asynch speeds up your page.
By default with our traditional snippet a browser will, with traditional JavaScript
the browser will make a request for JavaScript. And it'll wait and it won't execute anything
until the request comes back and starts executing the tracking code.
With our asynch you can make this request for the Google Analytics tracking code in
parallel, allowing your page to continue rendering. And finally, when the request comes back we
execute the script and go on. So what this means is that you can start issuing commands
of tracking before the script has even loaded. And that allows you to put the script at the
top of the page and make sure that you're collecting all your data.
So let's quickly walk through what's going on in this script here. We're first creating
an array so that we can save a lot of commands. Now, the way that we're tracking here is we're
pushing arrays onto the array where each, the first parameter is the actual method that
we're tracking. And all the parameters are actually the values that get passed into those
functions.
This in and of itself doesn't do any tracking, but allows us to say this is what we want
to be tracked once our script is loaded. Now down below we have a self-executing function
that will asynchronously load this tracking script onto the page. Once the script's loaded,
it'll go back to the array, it'll pull out all the commands, it'll replace the GAAC array
with the GAAC tracking object, execute the commands and for any subsequent request to
Analytics it'll go directly and make those utm.gif requests.
And that's, and that's it. I mean, you pretty much copy and paste. This is what you're doing.
You know, we make this ridiculously easy. I don't have much more to talk about it because
we just make it that easy.
So now let's go into the section where we're actually sending events and customer variables
into Google Analytics, which is this section here. Now for each click we're doing two things.
We're passing two commands, the set custom variable and the track event.
Before we get into each of these, how many people here have used custom variables? Great.
Custom variable is super powerful. What it allows you to do is send two strings to Google
Analytics to describe either a visitor, a session or a hit level. So what that means
is if you have a person who comes to your site and you have some sort of a membership,
you can assign them a customer variable for the membership that specifies if they're a
gold, bronze or silver customer.
You can assign a custom variable to a page level or a hit level. For example, in a content
site where you're having a lot of different articles maybe you want to group the different
pages by author. In this case, the first string you would send is the auth, the name author.
And then actually the name of the author is the value. What that means is when you look
in your reports you can find out the total number of pages by these custom groupings.
So the way we send this information to Google Analytics is we call a set custom variable
method. The second parameter that we pass is, there, there are five custom variables
that you could send at any one given time.
So here we'll use the first custom variable. Here we'll use the name top links. And here
we'll pass the name attribute, which in this case is our link ID. Now this is the key part
here, is that we're using a customer variable to pass an ID which represents the primary
key in our database. This is the magic, this is the advanced way to use Analytics.
The second part of this method is to track an event. How many people here know about
event tracking? Events allow you to track interactions with your content. Traditionally
we've only had page views, but with Web 2.0 we have a lot of rich applications that we
want to track how many people click the poke me now button on Facebook.
This is why we came out with event tracking. Not for just tracking poke me buttons, but
to track any sort of interaction with your content. If you have a mobile site you can
use tracking, you can use event tracking to track the number of times people do clicks.
And it's a way you can send your own data into Analytics.
In this case we'll use events just to send a custom variable. We pass one string as the
top links. And we pass the inner HTML value, which is the value within the link tag here.
That makes it really easy for us to interpret the reports. So when we take a look at this
page that we're tracking, let's go back for a second.
[ pause ]
>>Nick: Okay.
[ pause ]
>>Nick: Here we have all the commands that are being added on here for each of the clicks.
And finally, if we open up Firebug here, request the page, here we see the utm.gif parameter
for page view we're tracking. For each of these you can now see these utm.gif parameters
being sent to Google Analytics. So now we're being, we're collecting data.
And you can actually come into each of these and you can actually see the actual data that
we're tracking, this UTM E parameter has all the information. And if you can see it if
you have really good eyesight you can see that we're tracking top links, we're tracking
the string inside of it and we're tracking the actual link ID, which is our primary key.
Now what I've showed you is how to use Firebug. You can use Developer Tools and Chrome, but
tracking the actual request to Analytics is a great way to troubleshoot your implementations.
Instead of waiting 24 hours for your data to be processed, you can be assured that if
you're sending us data we'll be processing your data. So use the tools like this to make
sure that you're debugging and that your code is actually working properly. All right.
[ pause ]
>>Nick: So we just talked about how we're sending data into GA. Now what we want to
do is export the times, all that information, and store it in our database. So the process
we're gonna do is this two step approach. We're gonna create a Java application that's
gonna be able to be rescheduled, and it's gonna go out to Google Analytics using our
Data Export API. It's gonna pull all the relevant data for us and store it into a database.
Then on the client's side when it makes requests for this page of links we hit our server.
It'll just hit our local database and return that to the end user.
Going through this process is, is really simple. The main, the first part that I want to really
talk about and focus on is how we map the tracking code to our Data Export API Query.
So we just talked about setting custom variables. Where we set the first custom variable, we
pass it two strings, the name of the custom variable, top links, and the value is the
ID which is our primary key.
So when we look at the Data Export API Query we first want to set a filter where we're
only looking at data for the first custom variable whose name is top links. We then
want to set the dimensions to look at the first custom variable value, which is our
primary key.
And finally, we want to look at total events. So notice here that we're using custom variables
to track the dimensions, but we're using event tracking to track the number of metrics. How
many people have a configuration set up like this?
Let's take a look at the code now, that it shows us how we export our data into our database.
Now here's a simple Java application. In our main method we create a new example, and we
run the main example by passing all the arguments. There's five steps. There's, we're first gonna
configure the data range so we can schedule this as a cron job. We're then gonna create
a MySQL database connection. You guys all know how to do that with JDBC.
We'll then use a, create a, retrieve a Google Analytics service object. Now this is the
object that allows you to access all the data in Google Analytics. We'll then get the data
and then we'll update the database with our information. Now this code, we're gonna write
an article, we'll, we'll open source the code. You'll be able to take it and put it in your
own environments.
So today I'm only gonna talk about the most important part that's relevant to GA, which
is how we get the Analytics service object. And we're gonna show you how ridiculously
easy it is to actually make queries to our API. So here's the method where we're getting
the service object. This Analytics service class is in our Java client library. You can
get it online. You pass it, the name attribute of your application, or name string, or string,
and you get an object back.
In this case you need authorized access to the API, so we're gonna use a method called
client login. Now this application's gonna sit on our server, it's gonna be running every
day, every week, every month. Nobody's gonna be having to authenticate. So we just use
client login to pass the user name and password. And at that point we have an object that we
can actually access our API. It's that simple.
Let's now look at how we use the object to get data. The first part is specifying a URL
that defines the end point of Analytics. We create a new query object by passing in the
URL. We then specify which profile we want to access to start an end data range. And
here we set our filters, dimensions and metrics. What we just looked at.
Finally, we set the sort. And now for the Analytics service object, we call it a get
feed member. Let me just pull this up. We're passing the query. We're passing the class.
And boom, the feed result has all the data from Analytics. It's that simple. Once we
call this line magic happens, data's returned, you guys can do amazing stuff.
It's super easy to use. And the problem I have explaining this it's so easy that I don't
have that much, most of the time I'd speak around how you can set this into the database.
It's, it's hard to find really great examples because it's just so easy.
[ pause ]
So now we have our data in the database. The last step is to use that information. Here
was the original table that we looked at that had the primary key of the link ID. Our original
query just got the link name, the URL and the text. Our example just created a new table
and uploaded total events by the primary key. And now we can update the query to join on
the ID and order results by the total events.
Now this is a really simple example, but the implications are powerful. What we were able
to do is say for the number of times people clicked on their site, we were able to track
the user behavior and then present a brand new experience to them based on what people
have done the most on your site.
Now imagine you have a e-commerce site that has a list of products. What products should
you show people? Would you order them by alphabetical order, by color? What if you used the ordering
by how many people go to certain product pages when they search for the word shoes, and order
a list of products based on what people visit the most. That's what you can do with this
information.
[ pause ]
So on top of all this stuff that we're building for people, what I really am excited about
is that we're really putting a lot of resources to build out our developer ecosystem. We think
there's amazing new things people can do.
We're putting, we just released an app gallery that shows the type of integrations that people
have done. We're inviting our developers to come speak at conferences. We have two people
out in the sandbox. We have Juice Analytics and ShufflePoint, who can walk you through
all the exciting things that they've done with the data and the type of integrations
that they're able to do. We're doing blog posts where I personally will write about
your application and give it to our 50,000 readers on our blog.
We really are excited about the new stuff that you can do on how you can integrate Google
Analytics data with your business data to create brand new insights. So if you have
any questions, feel free to come up to the mic. I'll be happy to answer them.
[ Audience claps ]
>>Nick: Yep.
>>[Male audience member #1 with Slavic accent] Hi. So, it, it was very interesting when,
when you walked through this whole process of tracking, sending the tracking data to
the Analytics there [ clears throat ], exporting them, displaying them in the database. It's,
it's so great. Now, I, I just, I’m just wondering. If I just track those URLs on my
site, just put them into a database and command the counter and then use this as a result
without just going all this around trips, through the Analytics and back. Would that
work? Probably yes. So why, why to do the whole, the whole thing and what are the advantages
of doing this?
>>Nick: That's a great question. So, so the question if I can, if I can repeat it. What
you're asking is saying there's two ways to export data. One of them is a two step approach
by putting all this stuff into a local database. And the other option is just querying our
API directly for each request.
>>[Male audience member #1] No.
>>Nick: No.
>>[Male audience member #1] My question is, I own the data.
>>Nick: Sure.
>>[Male audience member #1] So I have it in my database. So I can just calculate it in
my database without going to Analytics, and just present to my users.
>>Nick: Exactly. So you have the data in your database.
>>[Male audience member #1] Yes.
>>Nick: But what we have is the engine to allow you to track how users interact with
the content that your database is serving. So for example—
>>[Male audience member #1] But I'm serving the content.
>>Nick: Sure.
>>[Male audience member #1] With my applications. So I know how, how I am serving the content.
>>Nick: Right. But do you know how people are interacting with, how many people are
clicking on link A, how many people are going to product B and how are, how many people
from search keyword shoes are clicking on those compared to people on search keyword
t-shirts? So that kind of visibility into being able to query against all these dimensions
and metrics gives you new views into the data that, which you can definitely build yourself.
But why build it yourself when you can get it for free?
>>[Male audience member #1] Thanks.
>>[Male audience member #2] I have two feature requestee kind of questions. And of course
I'm not expecting you to announce anything, but I am sort of curious to hear your attitude
about them and maybe gesture towards when I might be likely to see them. The two features,
first real-time analytics, or at least less than 24 hours time analytics. And the second,
data portability. I, I've given you guys a lot of data, and I wish I could get it all
out. I don't just want to query it. I want to get my data back.
>>Nick: No, those are great questions. So, we're trying to reduce the time it takes to
process data. And for smaller accounts you generally, the data will be done faster. So
we're always trying to improve that. And so it really depends on the size of the account.
So when we process YouTube it takes a little bit more time than we process maybe like a
smaller blog. So I would, so it really depends on the size.
And the other question you had is how do you access all your data. So one is we, we, you
know, before we didn't even have a Data Export API. So now we have an Export API. And we're
starting to allow you to access all that information. We're reducing the quota more and more, so
that way you can access all the information account, export it out and present it. I,
I guess the, the big challenge when we, when we hear that is that it, it's not necessarily
like a table that we store in Analytics, it's more of a data queue. So the combinations
of dimensions and metrics can be infinite. You can say well show me how many, you know,
show me the visits and dimen, you know, visits and pages from cities that start with M, right.
>>[male audience member #2] Well that's a query. I mean I, you have raw data sitting
somewhere. I don't care what format it's in. You can give it to me in any format you like.
>>Nick: Sure.
>>[Male audience member #2] But I mean, the Data Export API is not an export API, it's
a query API. I can make any query I want, but I can't get my, all my data back out again.
And that—
>>Nick: Yeah, no.
>>[Male audience member #2] You know, like a data dump.
>>Nick: Sure. It's definitely something we've heard a lot. Maybe we can talk about some
more of your use cases after that. After this session, so we can get, you know, we can help
better understand it.
>>[Male audience member #2] Okay, thanks.
>>Nick: Sure. All the way in the back.
>>[Male audience member #3] Yeah. So I've been spending the past couple of days thinking
about the asynch JavaScript code. And it looks to me sort of like you've, you've moved into
almost a declarative programming paradigm. I, I sort of write out a list of things I
want to do and I push them onto a stack and, and then it gets executed somehow.
>>Nick: Um-hum.
>>[Male audience member #3] What was the design philosophy behind that? Why did you go that
way?
>>Nick: It, it's a great question. So first we wanted to do asynch, right, to make the
Web faster so it could load on the majority of browsers. The challenge though is that
when we're telling people to track before the object to track is even there, we needed
a simple mechanism so that we, we can queue up requests and then execute them later. So
to keep it simple we just created an array so that we can push these commands as a command
array onto them.
>>[Male audience member #3] Okay.
>>Nick: So it's more of a, a function of how do we allow you to track before you can even
track. And then make it simple so you can continue to track after you can really send
data to our services.
>>[Male audience member #3] Okay, thanks.
>>Nick: Sure. Yeah.
>>[Male audience member #4] I have a question, also feature related to, we're sort of synchronized,
synchronicity. If there, say for example I, I have a Web application. It's a premium user
application, user base, base for it. And I add, I don't know, sort of like a, whatever,
a calendar. Can I put event tracking codes into every single of the buttons into my UI
to track, and use the data, the Data Export API to bring that information back down and
sort of make a heat map of the application as it's used? Can, can I query for each of
the buttons, and each of the buttons be brought back and sort of, even if it's copy and pasted,
I don't care. I'm doing it once a day. I don't need it in real-time. But can I do the, that?
>>Nick: Yeah. You can, you can use events tracking. There's one limitation on events.
You can send 500 events per session currently.
>>[Male audience member #4] Okay.
>>Nick: And that's a limitation in, well that's a restriction we have in the JavaScript.
>>[Male audience member #4] Um-hum.
>>Nick: But the way people would typically track where people are interacting is like
if you have an ID for each of those buttons—
>>[Male audience member #4] Um-hum.
>>Nick: That's like a DOM element—
>>[Male audience member #4] Um-hum.
>>Nick: that's defined as a ID attribute.
>>[Male audience member #4] Um-hum.
>>Nick: You can pass the ID as one of the parameters to event tracking. So that way
you'll know where to actually draw the, the, the information on top of that.
>>[Male audience member #4] Okay.
>>Nick: It's definitely possible.
>>[Male audience member #4] Thank you.
>>Nick: Sure. Yep.
>>[Male audience member #5 with Indian accent] Hi. If I have an application like a Google
Earth or Google Maps based application, would it be able to track, like really use it as
navigating, or you know, clicking on Google Earth?
>>Nick: That's a good question. So if you're able to listen to the events of somebody interacting
with the map, in the function handler you can then issue tracking code, execute event
tracking to Google Analytics.
>>[Male audience member #5] Okay. Thanks.
>>Nick: Sure.
>>[Male audience member #6] Right now you allow one account code per page, is that correct?
>>Nick: So, the best practice is to use one account code per page. But many people, I've
seen up to five on a page. So, you can, you can definitely add more. There are certain
implications on doing that. So we don't, we don't promote it because weird things could
happen with the data. But it's definitely possible.
>>[Male audience member #6] Okay. By weird things, well okay, the reason why I'm asking
is what our application does is it modifies a customer's Web page. So they have their
own analytics that they want to do.
>>Nick: Um-hum.
>> And we want to be able to as part of our verification, include our, our own code as
well.
>>Nick: Sure.
>>[Male audience member #6] So that was, that's the reason why it would be very valuable for
us.
>>Nick: Yeah.
>>Nick: No, so a lot of people do that today. The challenge is, is that our persistence
to track the visitor session actually happens in a cookie. And there's only one cookie name
space that we use. So both tracking codes are actually using the same cookie set. So
what that means is that if you have, if the, if the client is tracking a hundred pages
and you're only tracking a subset of maybe 50 pages, you guys are still gonna be using
the same session information.
So a person can come to their tracking code and be counted as a first time visitor. And
then come to your tracking code and they'll look like a brand new, they'll look like a
return visitor even though it's the first time they've, they're on your page.
So it's more of an issue with the way the cookies and the storage works. But it's definitely
possible for like interaction information, like pages, and visitor information 'cause
the, the visitor never changes.
>>[Male audience member #6] Well, it would be nice if you could look at making that more,
more possible.
>>Nick: Sure.
>>[Male audience member #6] Because I'm sure I'm not the only one in here who does things
like widgets and such like that.
>>Nick: Sure.
>>[Male audience member #6] And a related question is, because our customers tend to
be rather unsophisticated, have you thought about connecting the analytics directly to
a Google spreadsheet?
>>Nick: That's a great question. We, we have. We've talked to the spreadsheet team. Recently
they released what's called Apps Script. And there's actually a, a guy who's out in, in
Europe who actually created scripts that actually can do that today. So that, so that's actually
available. Just search for Google Apps Scripts analytics and it'll give you actually the
code so you can start doing that today.
>>[Male audience member #6] Okay. And the last question I have, promise [ laughs ],
is the world is not organized really around political boundaries if you think about New
York City, right next to New Jersey.
>>Nick: Sure.
>>[Male audience member #6] Like Upstate New York is a whole lot different than New York
City proper. And so being able to do a query based upon urban region if you will—
>>Nick: Sure.
>>[Male audience member #6] is really kind of critical. 'Cause I mean, if you talk to
someone who's from New York they talk about The Bronx is different than Manhattan, for
example.
>>Nick: Right.
>>[Male audience member #6] But even in the Bay Area San Francisco, I'm sorry, San Jose,
South San Jose is different than like closer Mountain View and so on.
>>Nick: Um-hum.
>>[Male audience member #6] It depends upon your target market, but being able to query
based upon some sort of non-political boundary.
>>Nick: Right. No, that's a good question. So the standard report says continent, sub-continent,
country, region or state and city. We also expose the latitude and longitude through
our Data Export API, so you're able to use that. And you can actually see a demo of how
people have integrated map data with Google Earth outside in, in the sandbox. So we have
some of that capability. But I, but I would completely agree. It could be more flexible.
>>[Male audience member #6] The U.S. Census kind of codes things.
>>Nick: Sure.
>>[Male audience member #6] The U.S. department—
>>Nick: So that's a, that's actually a great question. So there's certain IDs that you're
probably accessing like the, the DMA ID or the U.S. Census ID. We'd love to hear kind
of what those would be great, mostly so for you. Yep?
>>[Male audience member #7] Are there any plans to support more, I don't know if you
addressed this earlier, but more page views? I think you guys are capping out at like 30
million or something like that.
>>Nick: Right. So it, it really depends. So there's two types of, for advertisers who
link their analytics and, and add words of counts we ask that they no, send no more than
30 million pages per day. Now after and beyond that it becomes hard to really understand
like what's the additional value, because you have such a great sample set. So we typically
ask those people to enable what's called sampling. So you would only get a percentage of those
visitors. And, and generally when you're looking at analytics none of the data is gonna be
absolute. What you're really looking for are more of relative trends. So today we are at
a hundred. And then we launched a product and now we're at 10,000. So that increase
in traffic is the most important part. And that's typically worked well. So currently,
I mean those are the limits. You could, I mean that's what we state. You can send more
but it's not what we're looking for. Yep?
>>[Male audience member #7] I have 200 or 300 insurance websites that all use Analytics.
>>Nick: Um-hum.
>>[Male audience member #7] On each of the sites they link to another one of our servers
that provides security for forms; auto, home, coal form, stuff like that.
>>Nick: Sure.
>>[Male audience member #7] Is there a way, or what is the best way to incorporate the
analytics on my individual sites with their specific forums on a separate server?
>>Nick: That's a good question. So the, the main issue, it depends, our persistence all,
are based on cookies. So all the information of where they came from, the visitor ID, all
that information is in a cookie. So the, the key thing is to make sure that you can read
that information on these other sites. If it's to some, if it's, if it's the same domain
you're able to read the cookie. If it's a different domain then what you have, we have
a couple methods that allow you to serialize all the cookie information and pass that to
your server. And then there's a method which when enabled, it'll look for the, the query
parameter, the final page, to see if that information is there. And if it is it'll reset
the cookie instead of creating a new one. So the idea is to pass all the cookie information
through the query parameters.
>>[Male audience member #7] Okay. And one of the issues we have is some of the forms
are four, five, six pages long.
>>Nick: Um-hum.
>>[Male audience member #7] And we're trying to figure out which questions are getting
people to stop filling the form out.
>>Nick: Um-hum.
>>[Male audience member #7] And that's, I think I kind of understand what you're saying
with the cookies to allow, because the, the secure server all uses the same domain.
>>Nick: Sure.
>>[Male audience member #7] So each of those sites use the same domain for that.
>>Nick: Um-hum.
>>[Male audience member #7] Now, is that a setting I just change in the code that I embed
into the sites, or—
>>Nick: Exactly. So everything we track is based on the account ID that you put on the
page.
>>[Male audience member #7] Okay.
>>Nick: Right? So what you want to do is say this person came from site A, serialize the
cookie, send it over to the new domain, reset the cookies, make sure you're using the proper
ID, track all the pages. From the Analytics side it'll look like the same user was going
across all the pages. On the final form you set up funnel goals, funnel, goals and funnel
abandonment. You can see where people drop off. And then you can use our Export API.
Yeah, it's exciting.
>>[Male audience member #7] And one more question real quick. Is there a way to have more than
50 sites per account?
>>Nick: Yeah. It's, it's generally 50, there's certain, if you have like an account manager
with Adwords you can work with them to try to increase that. If you're reaching to the
50 part, you probably, most likely you want to start moving over to, starting to use new
accounts. And so you can sign up for any account, as, as many accounts as you want for free.
>>[Male audience member #7] Which is what I've done, it's just kind of hard to manage
when I have six different sub-accounts. I have to figure out which site is located on,
in which one.
>>Nick: Sure, sure. Okay.
>>[Male audience member #7] Thank you.
>>Nick: Okay.
>>[Male audience member #8 with European accent] I'd like to ask about getting notification
in tracking of YouTube videos.
>>Nick: Sure.
>>[Male audience member #8] In two, two cases. One case the video is embedded on my site.
>>Nick: Um-hum.
>>[Male audience member #8] The other one that YouTube, is on YouTube.
>>Nick: Right.
>>[Male audience member #8] But I'd like to find out for example click, stop, start, are
they particularly watching. Like the time spent on the video.
>>Nick: Sure. So when the video is embedded on YouTube there's currently no way for you
to actually add tracking code to YouTube. Right. So YouTube actually has their own product
called YouTube Insights, which actually looks at how many people drop off from your video
when you're watching it. I would take a look for that, because they have an API to also
access their YouTube Insights information. Now if you take that video and you embed it
on your own site, YouTube has what's called a JavaScript, there's two ways. There's one
where you just do the embed code and it, but you have no access to the interactions. YouTube
also has an embed API, it's all JavaScript based. What that means is you can listen to
the events when people click on different buttons. And so when you, when you actually
set up an event handler you can actually track events when people click a link. And the best
practice is, is that you don't want to track like every five seconds. You want to track
percentages of views, right? So how many people got 50% through, how many people got 20% through,
that, that type of information.
>>[Male audience member #8] Thank you.
>>Nick: Sure. Yep?
>>[Male audience member #9 with European accent] What if you want to switch from, to Google
Analytics from, from the old data?
Nick: Sure.
>>[Male audience member #9] So I have a lot of old data in our database, and we want to
switch to Google Analytics but—
Nick: Right.
>>[Male audience member #9] Is it better off to have everything on the same place and not—
>>Nick: That's a good question. Yeah. At this time we don't have a way to import your historical
aggregated data.
>>[Male audience member #9] Um-hum.
>>Nick: My recommendation is to just implement Google Analytics today, and continue using
the systems for a little while. What you'll notice then is that the absolute numbers will
be different, but the trends will be the same. And so over time you can start relaying, hey
we're using Google Analytics but this older system is still in place in case we need the
historical data. Eventually there'll become a point where you're like, we don't need the
older data. We can just, we'll keep it but we don't need to keep on collecting it.
>>[Male audience member #9] Um-hum.
>>Nick: Sure.
>>[Male audience member #9] Okay.
>>[Male audience member #10] So for me fundamentally the issue with Analytics is the signal to
noise ratio. Sorry, I'll tilt it up a little bit here.
>>Nick: Okay.
>>[Male audience member #10] One question I have is why you don't offer the option to
put in like the public facing IP address of your company. One of the problems I have is
our product people come up with a great idea, they launch the product and then they spend
all day looking at it. And our, we see a spike in traffic—
>>Nick: Yeah.
>>[Male audience member #10] It's all coming from our office when I actually—
>>Nick: Sure.
>>[Male audience member #10] dig into the logs. So why not offer the ability to filter
a, a set or a particular AP, IP address.
>>Nick: Sure. So that's a great question. And actually, that feature's available today.
And so the way we track at Google is that we have a site where if we tell people hey,
if you want to set up internal analytics just sign up for Google Analytics.
And there's a place in the administrative section which allows you to create filters.
And filters, what happens if you remember the, the part of the slides where I talked
to how we process data. Right before we create, right before we actually do the processing
of the data we apply these filters to all the data that's collected, which allow you
to manipulate the data.
For example, filter out anybody who comes from this IP range. You can use a regular
expression to do that. And when you do that, that means if you know the, the bank of IPs
that people are coming from your internal network you can make sure that it doesn't
get collected in the profile you view.
So, so the best practice is you collect all your data and you report it in one profile.
You create a new profile that uses the same data, but filters out all the internal traffic.
So you have like what's called a clean profile. And so that's available today. If you take
a look in our help center about profile filters, you'll see how, how that's done.
>>[Male audience member #10] So, so, that's the easy case. It seems like it should just
be a part of config and, creating filters is fine, that's doable but—
>>Nick: Sure.
>>[Male audience member #10] that's just kind of, it seems like usability that's kind of
poor but—
>>Nick: Yeah. No, I mean it can be made a lot easier and, and definitely that's something
that we are addressing.
>>[Male audience member #10] So one of the things we've noticed this year is we've had
an incredible spike in, let's call them bad actor bots. We've seen a large number of crawlers
that are not, they're using things like core networks and other things to kind of spoof
IPs and, or using zombie hosts to do crawling. What are you guys doing to actively identify
those and try and filter them out of the results?
>>Nick: Yeah. No, that's a good question. So we're, we're, we're enabling you to, to
filter out the traffic that we collect. And we're trying to give you more insight into
how we're collecting and processing the data. So that way if you guys find out these anomalies
you can actually then set up your own filters to, to filter them out.
We recently released a feature called intelligence, so if you do see a spike we'll alert you to
the fact that that spike has happened. So you don't have to spend all the time digging
through the data. So it's definitely a challenge for us to identify random people who create
spikes on your site. But we're, we're trying. Great. Does anybody have any other questions?
Sure.
>>[Male audience member #11] If we, if we develop the asynch tracking code, is there
an expected different in the numbers? Say you had two parallel universes, one with the
old tracking code and then one with the asynch code.
>>Nick: Yeah. That's a good question. I mean, I think if you change anything in a site something's
gonna probably be impacted. The traditional way we told you to track with the original
code was put, to put the code at the bottom of the page because the, the code was loading
synchronously and we didn't want it to, we didn't want it to reduce user perceived latency.
But now that we put the code at the top of the page, it's more likely if you have like
a lot of content and some of the tracking that might have, if people were, if a lot
of content was loading on the page and people were clicking away potentially they might
not have tracked. So by putting the code at the top of the page we're guaranteeing that
we're gonna collect more data. So usually you might get a better picture with asynch.
Cool. Yeah?
>>[Male audience member #12] A couple, a couple more questions. I'll be quick. So [ coughs
] first question is, is there a way to simulate the originating IP of the request so that
I, I can sent, send the, collect the data from, from some other host other than client's
computer?
>>Nick: Sure. Yeah, currently there's, there's no publicly supported way to do that. But
we've heard that from a lot of people and we're looking at it. Yeah.
>>[Male audience member #12] Okay. And the second one, is there a way you can kind of
open the code of the tracker? Because right not it's kind of garbled.
>>Nick: Yeah.
>>[Male audience member #12] So is there a way to—
>>Nick: That's a good—
>>[Male audience member #12] Look at it, just to, just to learn?
>>Nick: Yeah. No, exact, that's a great question. So currently no. It's closed. But as I mentioned,
what we're trying to do really is to open up the whole collection inside of the platform.
We want to have a supported protocol that will document so you'll know exactly what
data is being sent, and that way you can create your own kind of open libraries as well. So
it, it's something we're currently not, or not having today. But we definitely want to
engage with the developer community to have that type of open library.
>>[Male audience member #12] So any idea as to when?
>>Nick: It's, yeah, it's a good question. Because every time I try to say a date it
always, or I hear a date it always gets pushed date. So it's something we're, we're actively
working on.
>>[Male audience member #12] Thanks.
>>Nick: Yep.
>>[Male audience member #13] First off, Google Analytics is awesome and I can't believe it's
free. It's really cool.
[ Audience laughter ]
[ Audience clapping ]
>>[Male audience member #13] But I was just—
>>Nick: So, so if you think it's awesome there's a guy back there that you might want to just
tell him how awesome it is.
[ laughter ]
>>[Male audience member #13] So my question was, what's the delay from when a user visits
the site to what, when that date is available in the Dashboard.
>>Nick: That's a great question. It really depends on the size of the date we're processing.
We're trying to reduce that time, reduce that more and more. We don't publicly give out
the exact information. In fact, for API we say to be safe you'll get, after 24 hours
you can be sure that the data won't be changing. But we're, we're reducing it all the time.
And so what I would recommend, if you have a little, like a Google gadget or something
that's querying your API you can always see like when was the last time that data was
updated. So it really depends on the size of the account.
>>[Male audience member #13] Okay, cool. And my other question was, is there any trouble
with like BlackOut SEO if you're using the search data to modify what the page is serving
out based on the queries that are coming in? So for example, if someone comes in from a
specific Google search you want to modify the page based on the analytics data to give
them something that's more appropriate. Does like, does the SEO side of things, do they
look down on that?
>>Nick: That's a good question. You'd have to talk to someone like Matt Cutts—
>>[Male audience member #13] I'll catch him.
>>Nick: To, to tell you the exact, how they're, how they're doing stuff. But in the case of
the example I was showing, we were just showing dynamic pages based on data. It's a little
bit more targeted. So if it's dynamic it shouldn't be a problem.
>>[Male audience member #13] Cool. Thank you so much.
>>Nick: Sure. Any other questions? Great, thanks guys.
[ Audience claps ]