Google Analytics To Do Listfree Download



Download Google Analytics for Android to access all of your Google Analytics web and app reporting profiles from your mobile device. Google Analytics lets you measure your advertising ROI as well as track your Flash, video, and social networking sites and applications. Do that and then go to “Google Analytics Settings” and choose “New Variable” from the dropdown menu. You’ll then be taken to a new window where you’ll be able to enter in your Google Analytics tracking ID. This will send your website’s data straight into Google Analytics where you’ll be able to see it later.

When you own a website, analyzing and tracking your site’s traffic is critical. Knowing where your viewers are coming from, what days they come the most frequently, and how long they’re staying are just some of insights that you can use to help improve your site and inform your decision making.

If you are using Google Analytics for web site usage tracking and digital measurement, we have great news for you.

Now you can use Power BI to monitor, explore and visualize your Google Analytics data. With an out of box content pack, you can connect and gain insights into your data immediately. You can also connect directly through the Power BI Designer, allowing you to build your own reports and even create mashups with other sources that are important to you, ensuring all your data is in one place.

Out of Box Content

Connecting to Google Analytics in Power BI is easy; immediately after you connect you’ll gain insights around the usage of your site in the last 6 months. Using the Google Analytics API, this content pack provides a dashboard, a report and a dataset to allow to you monitor and explore your data.

Miguel Escobar from Powered Solutions is an avid Power BI customer and was very excited to hear we had support for Google Analytics. Connecting through his account, his out of box dashboard looks like the one below.

When connecting you can choose the account, property and view to connect to. This information can be found in your Google Analytics account, under the Home tab.

After connecting, your data will start to load into Power BI and you’ll be notified when your dashboard is ready. Selecting one of the tiles will drill into the 5 page report built on top of the data set.

You can also use Q&A to explore your data, such as asking questions about the website traffic – “total hits” or “total page views by date in the last 30 days”. You can ask questions about specific data points as well, such as “total sessions by browser where device is a tablet”. Every result can be pinned back to your dashboard to customize it however you want.

You can also pin data from other datasets to your dashboard. For example, if you’re tracking your mail campaigns using Marketo you can see the results of your latest campaign, right next to your site traffic.

Power BI Designer

The Power BI Designer also allows you to connect directly to Google Analytics to build your own set of reports.

To get started, download the latest version of the Power BI Designer. In the Get Data dialog, under the Other sources or using the search box in the top left, you’ll find Google Analytics:

This connector leverages the Google Analytics API, allowing you to access all the data provided when enabling Google Analytics for your site. After selecting it from the list of sources, you’ll be prompted for your credentials and to allow Power BI to access your account.

Once you connect, you’ll see a list of the accounts you have access to. Drill through the account, properties and views to see a selection of values, categorized in display folders. For example, try selecting Session > Sessions and Geo Network > Country to see the breakdown of session for the view by country.

As you select different values, we’ll send a query back to the source to get the result. The output will be a single flat table will all the values you selected. Google Analytics has a limit on the number of items you can select together, so select the initial set and build as needed.

Additional operations, such as filtering on the dates you selected, will also be sent in a query to Google Analytics. After loading the tables or switching to the Report view, you’ll be able to visualize and explore your data.

Here’s a view that Miguel built himself, showing page views over time as well as by language and page title.

What will you built with the Google Analytics connector?

We’re always interested in hearing your feedback – please leverage http://support.powerbi.com to let the team know how your experience was and if there’s anything we can do better. We look forward to your feedback!

Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.
Download google analytics report

Nick Mihailovski, Google Analytics API Team – August 2012

This tutorial describes how to access the Management and Core Reporting APIs inside Google Sheets using Apps Script.


Introduction

You can use the Google Analytics API and Google Apps Script to access your Google Analytics data from Google Sheets. This is powerful because it allows you to utilize all the great features of Google Sheets with your analytics data, such as easy sharing, collaboration, charting and visualization tools.

This tutorial will walk you through the code required to access your Google Analytics data in Google Sheets using Google Apps Script.

Overview

This tutorial will show you how register, and configure the Apps Script environment to use the Google Analytics API. Once configured, the tutorial walks you through how to retrieve a view (profile) ID for the authorized user using the Management API. Then how to use the view (profile) ID to query the Core Reporting API to retrieve the top 250 mobile search keywords from Google. Finally the results will be inserted into a Google Spreadsheet. Once you have data, the tutorial also discusses how to automate retrieving data.

When you build an application using the Google Analytics API and Apps Script, you will generally go through the following steps:

  • Enable the Google Analytics APIs in Google Sheets
  • Work with the Google Analytics APIs

Let's go through each step in detail.

Enable Google Analytics API in Apps Script

To enable access to your Google Analytics data from within Google Sheets,follow these steps:

  1. Create a Google Sheets file. Give it a cool name.
  2. Create a new Apps Script.
    1. In the menu, go to Tools -> Script Editor...
    2. If a menu pops up, just click Blank Project
    3. Give the project a name. Make sure it has a cool name.

Once you have a new script, you need toenable the Google AnalyticsService.

  1. In the script editor, select Resources > Advanced Google services...
  2. In the dialog that appears, click the on/off switch next to the Google Analytics API.
  3. At the bottom of the dialog, click the link for the Google Developers Console.
  4. In the new console, again click the on/off switch next to the Google Analytics API. (Once enabled, it will jump to the top of the page.)
  5. Return to the script editor and click OK in the dialog.

A little yellow dialogue box should popup that says that you have successfully added a new Google APIs service to your script. Now you are ready to start writing your first script.

Work with the Google Analytics API

This script in this tutorial will query the Google Analytics API for the top 250 Google mobile search keywords, then output the results into Google Sheets. To accomplish this, the script will go through the following steps:

  • Retrieve the authorized user's first view (profile).
  • Query the Core Reporting API for data.
  • Insert data into a spreadsheet.

Add the following function to the blank project.

In the code above, a try...catch block is used to handle any API errors. If any errors occur, the program execution will halt and the error will be displayed in a message box. In the try block, a function is used to perform each of the steps the script will go through. Let's now add the code for each of these functions.

Retrieve the Authorized User's First View (Profile)

Google analytics to do list free download windows 7

In Google Analytics, each report belongs to a view (profile) and is identified by a view (profile) ID. So when you specify a query for report data, you must also specify the view (profile) ID of the view (profile) from which you want to retrieve data.

The Google Analytics Management API provides access to all the accounts, webproperties, and view (profile) entities that belong to a user. Each of these entities belong in a hierarchy, and you can programmatically traverse this hierarchy to retrieve a view (profile) ID for the authorized user.

Note: Learn more about the how these entities are related to each other in the Management API Overview document.

The second function we will write will traverse down the Management API hierarchy and return the user's first view (profile). Copy and paste the following code to your Apps Script project:

In this function, the Accounts collection is first queried, using the Analytics.Management.Accounts.list method. If the authorized user has Google Analytics accounts, the ID of the first account is retrieved. Next, the web properties collection is queried by calling the Analytics.Management.Webproperties.list method and passing the method the account ID retrieved in the previous step. If web properties exist, the view (profile) collection is finally queried using the Analytics.Management.Profiles.list method. Both account ID and a web property IDs are passed as parameters to this method. If views (profiles) exist, the first view (profile) is returned.

Note: The Google Analytics API service must be enabled for all the Analytics.* methods to properly work.Google analytics download tracking

If at any time an API error occurs, or if the API response contains no results, an error is thrown with a message describing that no results were found. The catch block in the runDemo function above will catch this error and print the message to the user.

After the script returns, it can now query for reporting data.

Google Analytics To Do Listfree Download

Query the Core Reporting API for data.

Once you have a view (profile) ID, you use the Core Reporting API to query for Google Analytics report data. In this section you will learn how to query this API using Apps Script.

Add the following code to your Apps Script project:

The first part of the code constructs a Core Reporting API query using the Analytics.Data.Ga.get method. The method accepts a bunch of parameters that specify the type of report to retrieve. Each Core Reporting API query consists of a set of required and optional parameters. The required parameters are passed to the method as parameters while the optional parameters are passed as an object.

The table ID parameter is required and is formed by combing the prefix ga: to the view (profile) ID. The code creates the table ID using the view (profile) ID retrieved in the previous step. The start and end date are also required and specify the date range of the data to retrieve. Both are calculated based on today's date using the getLastNdays function. Finally all the optional parameters are passed to the function using the optArgs object.

Note: A full list of all the parameters and their definitions can be found in the Core Reporting API reference document. Also a full list of all the possible dimensions and metrics can be found in the Dimensions and Metrics reference.

When the Analytics.Data.Ga.get method runs, a request is made to the Core Reporting API. If an error occurs, it is caught in the try...catch block defined in the outer runDemo method. If the request was successful, the results are returned.

Insert Data Into A Spreadsheet

The final step in our script is to output the results from the Core Reporting API into Google Sheets. The outputToSpreadsheet method does this work. Add the following code to your project:

This function first inserts a new sheet into the active spreadsheet. It then inserts all the header and reporting data to the sheet. For more tips on how to insert data into Google Sheets, read Writing Data from JavaScript Objects to a Spreadsheet in the Storing Data in Spreadsheets tutorial.

Run The Script

Once you have added all the code to the project, you can now run it.

  • In the script editor toolbar, in the select function dropdown, select, runDemo.
  • Next, click the play button.

The first time you run this, a pop-up box will appear that will require you to authorize this script to access your Google Analytics account data.

Click authorize.

Once clicked, a new page hosted on google.com will open and prompt you to grant this script access to your data. Once you click on allow, you will be redirected to a confirmation page. At this point you the script will now be able to access your Google Analytics data and it can continue to execute.

Note: You only need to grant the script access to your Google Analytics data the first time the script runs.

After the script runs, click over to the window with Google Sheets. You should see all the keywords data returned from the API, or a message box with an error message.

Automate the Script

At this point you should have a script that queries the Google Analytics API. You might now want to automate this script to retrieve new data every night. Apps Script makes automation very easy using the triggers feature.

To automate this script go though the following steps:

  • In the script editor toolbar, click Resources -> All your triggers...
  • Click Add a new trigger. The triggers dialogue box will appear.
  • Configure the trigger to execute the runDemo method every night
    • The Run dropdown should be set to: runDemo
    • The Events dropdown should be set to: Time-driven, Day timer, and Midnight to 1am.

Once configured this script will run every night, giving you fresh data in the morning.

If any errors occur at night, you will want to be notified. Apps Script also allows you to send an email alerting if any failures occur. To configure this, in the triggers dialogue box, click the notifications link. A new dialogue box will pop-up and allow you to configure to which email you want errors to be sent.

Conclusion

you have successfully registered and authorized access to your script. You have queried the Management API multiple times to retrieve a view (profile) ID. Then you used the view (profile) ID to query the Core Reporting API to retrieve data and output it into Google Sheets.

Windows

Track Pdf Downloads Google Analytics

Using the techniques described in the tutorial will allow you to do more complex analysis, gain greater insight, build custom dashboards and reduce a lot of time running manual reports.

A couple of other cool tutorials you might find useful to help you get more out of the Google Analytics API and Google Apps Script are:

  • Reading Data from Spreadsheets – So you can specify your APIs queries in a spreadsheet instead of in JavaScript.
  • Inserting Charts from Spreadsheets into a Google Site – So you can create dashboards in Google Sites with your Analytics Data.
  • Custom Menus – To make it easy for other users in your company to use the scripts you write.

Google Analytics To Do List Free Downloads