Index: polymer_1.0.4/bower_components/ga-api-utils/build/demo.html |
diff --git a/polymer_1.0.4/bower_components/ga-api-utils/build/demo.html b/polymer_1.0.4/bower_components/ga-api-utils/build/demo.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23ec919d93a879f39c191e192a80b25ec2be92a2 |
--- /dev/null |
+++ b/polymer_1.0.4/bower_components/ga-api-utils/build/demo.html |
@@ -0,0 +1,52 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta charset="utf-8"> |
+ <title>Google Analytics JavaScript API Untilities Demo</title> |
+</head> |
+<body> |
+ |
+<div id="embed-api-auth-container"></div> |
+<pre id="account-summaries-output"></pre> |
+ |
+<!-- Load the account summaries module, it will be at: |
+ `window.gaApiUtils.accountSummaries` --> |
+<script src="ga-api-utils.js"></script> |
+ |
+<script> |
+// Use the Embed API to authorize the user. |
+(function(w,d,s,g,js,fs){ |
+ g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(f){this.q.push(f);}}; |
+ js=d.createElement(s);fs=d.getElementsByTagName(s)[0]; |
+ js.src='https://apis.google.com/js/platform.js'; |
+ fs.parentNode.insertBefore(js,fs);js.onload=function(){g.load('analytics');}; |
+}(window,document,'script')); |
+ |
+gapi.analytics.ready(function() { |
+ |
+ // Run the demo once the user is authorized. |
+ gapi.analytics.auth.on('success', gaApiUtilsDemo); |
+ |
+ // This client ID will work at http://localhost:8080. |
+ // To run this demo on other hosts or ports, you must use your own client ID. |
+ gapi.analytics.auth.authorize({ |
+ container: 'embed-api-auth-container', |
+ clientid: '793177639245-olst43lspv93vkoql0b9l26hmpf9kfmv.apps.googleusercontent.com', |
+ }); |
+}); |
+ |
+function gaApiUtilsDemo() { |
+ var output = document.getElementById('account-summaries-output'); |
+ gaApiUtils.accountSummaries.get().then( |
+ function onResolved(summaries) { |
+ output.innerText = JSON.stringify(summaries.all(), null, 2); |
+ }, |
+ function onRejected(error) { |
+ output.innerText = error.message; |
+ } |
+ ); |
+} |
+</script> |
+ |
+</body> |
+</html> |