forked from googleapis/google-api-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello_analytics_api_v3.html
More file actions
44 lines (38 loc) · 1.59 KB
/
hello_analytics_api_v3.html
File metadata and controls
44 lines (38 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE>
<html>
<head>
<title>Hello Google Analytics API</title>
<link rel="stylesheet" type="text/css"
href="//fonts.googleapis.com/css?family=Cantarell|Inconsolata">
<link rel="stylesheet" type="text/css"
href="pretty.css">
</head>
<body>
<h1>Hello Google Analytics API</h1>
<p>This page demonstrates how to query the Google Analytics API version 3 using the
<a href="https://code.google.com/p/google-api-javascript-client/">
Google API JavaScript Client Library</a>.</p>
<p>The demo traverses the
<a href="http://code.google.com/apis/analytics/docs/mgmt/v3/mgmtGettingStarted.html">
Management API</a> to retrieve the first profile ID for the
authorized user. This profile ID is then used with the
<a href="http://code.google.com/apis/analytics/docs/gdata/v3/gdataGettingStarted.html">
Core Reporting API</a> to retrieve the top 25 organic search terms by visits.</p>
<p>To learn how this works, read the detailed comments in the
<a href="hello_analytics_api_v3.js">JavaScript source code</a>.</p>
<p>To run the demo:</p>
<ol>
<li>Click the authorize button to grant access to your Google Analytics data.</li>
<li>Click the run demo button to start the demo.</li>
</ol>
<hr>
<button id="authorize-button" style="visibility: hidden">Authorize</button>
<button id="run-demo-button" style="visibility: hidden">Run Demo</button>
<br>
<hr>
<div id="output">Loading, one sec....</div>
<script src="auth_util.js"></script>
<script src="hello_analytics_api_v3.js"></script>
<script src="https://apis.google.com/js/client.js?onload=handleClientLoad"></script>
</body>
</html>