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
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
There’s a tutorial on how to use the Analytics API, available for Java, Python, PHP and Javascript.
There are also libraries that simplify the use of its API: the google-api-php-client from Google itself (there is a tutorial of the Commission’s response to the SO), gapi-google-Analytics-php-interface and the Google-Analytics-API-PHP, among others.
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 php google-analytics
You are not signed in. Login or sign up in order to post.