How to display Google Analytics results on the website?

Asked

Viewed 1,657 times

2

I’ve been using Google Analytics for some time, but now I wanted to show the results on a page. I have some problems understanding how it works. I would like you to advise me a guide/tutorial or explain how to use.

2 answers

2

1

The ideal is to create a widget that shows the statistics you want just by inserting some HTML and Javascript that makes AJAX requests to pick up the data to show.

But it’s safer for this widget to access a PHP script on your server than to access the Google Analytics API directly, because you don’t want third parties to access any statistics from your site.

There are several components ready in PHP to do just that, for example the Smartgapi. This component both generates HTML and Javascript to insert into your pages, as well as processes AJAX requests to route to the Google Analytics API.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.