Création des Logiciels de gestion d'Entreprise, Création et référencement des sites web, Réseaux et Maintenance, Conception
Création des Logiciels de gestion d'Entreprise, Création et référencement des sites web, Réseaux et Maintenance, Conception
Jeetendra |
Nick |
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
The first part of the asynchronous tracking code snippet assigns the _gaq variable to a JavaScript array. After that, two tracking API calls (encoded as arrays) are pushed onto _gaq. When the tracking code initializes, it transforms the _gaq object from a standard array into a new object and executes all the tracking API calls initially collected in the array. With this feature, you can immediately store all necessary tracking calls even before the Google Analytics tracking code is downloaded! No more worrying about race conditions or dependency issues on the ga.js tracking code.import gdata.analytics.client
APP_NAME = 'goal_names_demo'
my_client = gdata.analytics.client.AnalyticsClient(source=APP_NAME)
# Authorize
my_client.client_login(
INSERT_USER_NAME,
INSERT_PASSWORD,
APP_NAME,
service='analytics')
# Make a query.
query = gdata.analytics.client.GoalQuery(
acct_id='INSERT_ACCOUNT_ID',
web_prop_id='INSERT_WEB_PROP_ID',
profile_id='INSERT_PROFILE_ID')
# Get and print results.
results = my_client.GetManagementFeed(query)
for entry in results.entry:
print 'Goal number = %s' % entry.goal.number
print 'Goal name = %s' % entry.goal.name
print 'Goal value = %s' % entry.goal.value
Nick |
Pete |
(Cross-posted from the Google Analytics Blog)
Back in Episode 10 of Web Analytics TV, (32:00), Lisa C from Melbourne asked how to pull a trending report from Google Analytics for the top organic search landing pages. This was such a great question, that we wrote 2 articles and released sample code describing how you can automate retrieving this data from Google Analytics Data Export API. But first let’s look at the results.
Here is a graph plotting traffic to the top 100 landing pages for organic search for all of June for www.googlestore.com.
Let’s Analyze:
This is the typical trend graph you can find across the Google Analytics web interface. By itself, all you can tell is that something happened during the spike. what you can’t figure out is which page actually increased in traffic; to do so would require lots more digging.
Now let’s try again:
Here is a stacked area graph of each of the top 100 landing pages for organic search.
Let’s Analyze:
Awesome right! So obvious why this is cooler. But let me explain.
Lisa’s graph, above, presents significantly simplified insights. Notice how much more we can get from this graph. We can see the green page is what caused the big spike. Also we see that the blue and orange pages had interesting changes in traffic patterns; changes we couldn’t identify from the graph on the left. Being able to break down the totals graph is indeed a gold mine for analysis.
Typical actions you, or Lisa (!), can take from this data are to get the organic search keyword to send traffic to the blue page. Then to identify the keywords sending traffic to the green and orange page and see if we can increase traffic to other pages.
Exporting the Data from the web interface:
Anybody can pull this data from the Google Analytics web interface. You simply create a custom report with landing pages and entrances. Then drill into each landing page, and export the data to a csv file. Finally you go through all csv files and compile them into a single file for analysis. Let's illustrate:
Going through each report individually is a LOT of manual work, but we can automate all of this using the Data Export API; reducing hours of work into a few minutes!
Using the Data Export API to Automate:
In part one of our series, we demonstrate how to use the Data Export API to automate the exact task above. A user specifies 1 query to determine the top landing pages. The for each landing page, a separate query is used to get the data over time.
This is great and we built it to work with any query with a single dimension. But notice that the number of queries grows with the number dimensions. In fact this program requires n + 1 queries so if you want data for 1,000 dimensions, it will take 1,001 queries.
This is bad because there is a daily quota of 10,000 queries for the Data Export API. So if you ran this program 10 times, with 1,000 dimensions, it would require 10,010 queries completely using your quota. ouch!
Optimizing Data Export API Requests:
To reduce the number of queries requires, the second part of this series describes an alternate approach to retrieving the same data, but minimizes the number of queries required. In the second approach, we use Data Export API filter expressions to return data for multiple dimensions in each request.
This approach dramatically reduces the amount of quota required. In the best case, only 2 queries are required.
Using this second approach, analysts can now run this report to their hearts content. They can do this for different time frames, and different dimensions, comparing organic vs paid traffic, trends of keywords by search engine, even compare traffic by geography.
As we mentioned, we wrote two articles describing both approaches and released the sample code for the application. Let us know the amazing insights you find through using this tool.
Have fun!
By Nick Mihailovski, Analytics API Team2013, By: Seo Master(Cross-posted from Google Analytics Blog)
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!
By Alexander Lucas, Google Analytics API Team2013, By: Seo MasterJeetendra |
Nick |
Cross-posted with the Google Analytics Blog and the Google Apps Developer Blog
Many people have been asking for a simple way to put Google Analytics data into a Google Spreadsheet. Once the data is inside a Google Spreadsheet, users can easily manipulate Google Analytics data, create new visualizations, and build internal dashboards.
So today we released a new integration that dramatically reduces the work required to put Google Analytics data into any Apps Script supported product, such as Google Docs, Sites, or Spreadsheets.
Here’s an example of Google Analytics data accessed through Apps Script and displayed in a Google Spreadsheet.
We know that a popular use case of this integration will be to create dashboards that automatically update. To make this easy to do, we’ve added a script to the Spreadsheets script gallery that handles all this work - no code required. The script is called Google Analytics Report Automation (Magic).
This script is a great template for starting your own project, and we’ve had many internal Google teams save hours of time using this tool. Here’s a video demoing how to build a dashboard using this script:
You can find this script by opening or creating a Google Spreadsheet, clicking Tools -> Script Gallery and searching for “analytics magic”.
Of course many developers will want to write their own code. With the new Analytics – Apps Script integration, you can request the total visitors, visits, and pageviews over time and put this data into a spreadsheet with just the following code:
// Get Data.
var results = Analytics.Data.Ga.get(
tableId,
startDate,
endDate,
'ga:visitors,ga:visits,ga:pageviews',
{‘dimensions’: ‘ga:date’});
// Output to spreadsheet.
var sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet();
sheet.getRange(2, 1, results.getRows().length, headerNames.length)
.setValues(results.getRows());
// Make Sandwich.
To get started now, read our Automated Access to Google Analytics Data in Google Spreadsheets tutorial. Also check out the Google Analytics Apps Script reference docs.
Are you ready to start building solutions using Google Analytics and Google Apps Script?
We’d love to hear new ways you use this integration to help manipulate, visualize and present data to solve business problems. To encourage you to try out this integration, we are giving out Google Analytics developer t-shirts to the first 15 developers to build a solution using both APIs.
To be eligible, you must publish your solution to either the Chrome Web Store or the Spreadsheets Script Gallery and include a description of a business problem the script solves. We’ll then collect these scripts and highlight the solutions in an upcoming blog post. After you publish your script, fill out this form to share what you’ve built.
We’re looking forward to seeing what you can do with this integration.
Many developers have asked for a faster, more powerful way to access Google Analytics account configuration data through the Data Export API. We’ve listened and today we’re releasing a preview of the new Google Analytics Management API.
The Management API provides read-only access to Google Analytics configuration data. It consists of 5 new Google Data Feeds that map directly to the Google Analytics data model.
Previously, the API returned all the configuration data at once, which in many cases was inefficient if you only needed a subset of data. Now with separate feeds, developers can request only the data they need. For example, it’s now easy to get the Profile IDs for a single account or the Goal configuration data for only a single Profile.
To help you learn more we created a new Management API section in our developer documentation. We also created new reference examples in Java and have a live working demo in JavaScript. Check it out, no coding needed!
The Management API is being launched in Labs as an early preview. The API will change, grow, and get better over time. We recommend developers who aren’t committed to making updates to their applications only experiment with the new API and continue to use the Account Feed as their primary source for configuration data. We will strive to give you at least one month advanced notice of changes to this API.
The Management API represents a significant new piece of the Google Analytics developer platform. We encourage you to come try it out and give us feedback in our new Management API Google Group.
P.S. - Please make sure to sign-up for our notify list to stay up-to-date on all the latest Google Analytics Developer updates.
Thanks!
By Jeetendra M. Soneja, Google Analytics API Team
MCF DNA Visualization in Tableu Software |
Mazeberry Express Screenshot - Focus on a Channel |
Jeetendra |
Nick |
Pete |
Jeetendra |
Nick |
<div id="chart1"></div>
<script>
var chart1 = new gadash.Chart({
'type': 'LineChart',
'divContainer': 'chart1',
'last-n-days':30,
'query': {
'ids': TABLE_ID,
'metrics': 'ga:visitors,ga:visits,ga:pageviews',
'dimensions': 'ga:date',
'sort': 'ga:date'
},
'chartOptions': {
hAxis: {title:'Date'},
vAxis: {title:'Visits'},
}
}).render();
</script>
The story of Dan and how he came to own a comic book store.We're excited to kick off the Google Narratives Series and plan to highlight more developers in our community so if you have a story like Dan's that you'd like to share with us, we're accepting submissions via our online submission form. Better yet, come tell us your story at Google I/O!
At 28 years running, Hijinx Comics, is the oldest comic book store in San Jose, California. From both a personal and business perspective, Hijinx Comics holds a special place in Dan Shahin's life. At the early age of 11, Dan was hired at Hijinx, which was at the same location at the time but went by a different name. Dan continued to work there throughout high school, building his lifelong passion for comics. He left the comic store behind to attend college and later worked at a number of high tech jobs, gaining experience in UNIX systems administration, release management, and software engineering. But by the year 2000, still Dan couldn't shake the feeling that something was missing in his life. Hours of soul-searching revealed that the missing piece was the excitement and passion that he had once experienced when working with comics.
Dan decided to get in touch with the owner of the comic book store. It turned out to be perfect timing because the owner of the store was ready to sell. Dan picked up everything he owned and moved back to his old neighborhood to run the comic book store. He reopened the store as Hijinx Comics and expanded on the traditional business of collectible comics and novelty items with a new focus on graphic novels and books focused on entertainment reading.
Because of the amount of time Dan had worked with comics as a teenager, he had keen awareness of the pain points related to subscriptions and inventory. Drawing on these experiences, he developed a software suite to manage the subscriptions and inventory of his shop and of a brand new online bookstore. Best of all, he opensourced the whole offering to help other comic book stores alleviate the same issues. From there, a side business grew that involved him consulting and implementing a management system and hosting solution to other comic book stores across the nation.
Today, Dan's working on Ver.2 of his project while Ver.1 runs his current business needs. Below are some excerpts from our meeting with Dan.
Q: Tell me about your Google implementation and if there were any obstacles.
A: I use a lot of Google Code products to build my own open source comic shop management system. I use Google Checkout for my online bookstore ( http://www.comicbookshelf.com ) and did the level 2 integration myself in my custom LAMP application. I also make heavy use of Google Analytics [used to compare data from his own raw server logs], Charts API, Apps for Domains and thanks to last year's I/O, I'm getting into App Engine development as well as Gears, which is what really brought me to Google I/O. My web-based point of sale system uses all of the Gears APIs to bring down UI latency and to allow offline use, which are the two greatest sticking points to current adoption of similar systems. The documentation is well-written with one exception. It would be nice to have a cookbook section - that type is more helpful. More real-life examples in more detail, casual, reader friendly and a commonly used code section. They tend to have lots of detail and the high level can sometimes be fuzzy
Q: What effect have you seen with your customers as a result of the Google implementation?
A: Customers usually come to visit the store but can also log in and update their subscriptions on their own. There's a quicker checkout process since they do the rest of their browsing online. We have a book club where we collect email addresses for customers that buy certain novels online. Customers are also able to offer reviews or books we sell. These reviews are available both online and in the store. We keep track of this type of data in a CRM and based on it, can help recommend favorites and offer Netflix type suggestions.