Search code examples
javascriptgoogle-analyticsgdatagdata-apigoogle-analytics-api

Google Analytics API - Get Pageviews for Dashboard


I am trying to create a blog dashboard that will connect to your Analytics account and show BASIC stats on your site. I am using Node.js for the blog system, so it would be best if it was in Javascript so I can convert it for Node.

I am looking for a how-to guide, or someone to point me in the right direction. I have tried some sample code on the web but none of it works, or its outdated.

Basically all I want is pageviews for the past 7 days by day.

Any help would be GREATLY appreciated.

Thanks,


Solution

  • I have created a service to do exactly this: EmbeddedAnalytics. Our service uses Google 3rd party authorization protocols so you are not providing us with your credentials. All you need to do is embed a snippet of code into your site where you want the stats to show.