user3387522
user3387522

Reputation: 127

adding google analytics into a php dashboard

Hi I have a website that I am creating at the moment I have just created a dashboard for admin users I was wondering is there a way I can embed a Google analytic's dashboard or the elements of the dashboard into my own website.

My website is PHP based with some HTML I am not sure if I am using a framework that the analytics can be implemented into because at the moment I'm currently using bootstrap for the admin dashboard the rest I have hand coded.

Any guides any examples of people doing this themselves that would be much appreciated.

Upvotes: 0

Views: 3161

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117321

I would recommend you look into using the Google Analtyics API with a service account. You will only be logging into your own data so there is no need to go though the full Oauth2.

The most current version of the Google PHP client lib can be found here on github under examples you want to look into the service-account.php it should show you how to get working with a service account.

Note: Unfortunately the hello analytics tutorial is out of date and uses the old client lib, don't go there. I have been told they are working on an update for it.

Upvotes: 1

Related Questions