In one page on my personal site, I like to be able to see some data get from Google Analytics.
I like to have a list of all my site and the average visitor per week or per month over the current year
I have check some solution:
Yahoo Pipe (look complicated)
Google Analytics PHP API class(look nice)
Google Analytics API (look official)
Dimension Analyzer for Google Analytics(look fancy)
So at this point, it have done my research, but none give me something i like to have. Getting a JSON from google would be nice. I will have to parse a XML maybe, but i like to see simpler solutions.
ANYthing would be nice too see
The current version of the Core Reporting API supports this.
You can use the PHP client to access the API. You'll need to register your project in the API console to obtain OAuth 2.0 client ID and secret.
Related
i have online tool that works with users based on oauth 2.0. I have access to their Google Analytics, etc.
The only one that i can't access is PageSpeed API because i don't know and can't find scope URL of this service.
For Google Analytics, for example, i use https://www.googleapis.com/auth/analytics.readonly scope etc. But it seems like PageSpeed api does'nt have any scope and is accessible only with user API key. But in that case i can't offer to my users Pagespeed insights for their pages (because one API key has only 50 000 queries/day).
I did'nt find even in Oauth playground on:
https://developers.google.com/oauthplayground/
Can you please help me how to solve this problem if i don't wanna press users to Google Developer Console?
Thank you!
PageSpeed API access works fine with just an API key (as mentioned in the Google Developers Console, see the subpage there for the PageSpeed API) which is also much easier to implement for the developer.
I think this is the case because one can by default run pagespeed for any given URL, so no need for a permission workflow as opposed to Google Analytics etc.
As answered above, it should work just fine with an api call. As per the Google PageSpeed Insights API.
This is your API URL for v2 of the API:
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?'
The current version however is, v4. So that looks like this: https://www.googleapis.com/pagespeedonline/v4/runPagespeed
Here's a sample function to call Pagespeed API, using v2:
def runPageSpeed(API_URL, API_KEY, input_url, insightstrategy):
query = [
'url=' + input_url,'filter_third_party_resources=true',
'key='+api_key, 'strategy='+insightstrategy] #insight strategy is either 'desktop' or 'mobile'
src = API_URL + '&'.join(query)
return src
P.S: you will need API Key, which you can generated under Google Developers, in order to run it. Also the following packages: (as per I checked last):
google python api client
requests
Try this and And you should be good. No need for oauth.
how can you count the count number of tweets for a specific hashtag on twitter? is there a way to avoid php and creating twitter app on the twitter developer site?
i might want to use go or c++ instead of php.
Thanks,
Geri
In order to count Tweets in real-time, you will need to use the Twitter Streaming APIs, in particular the statuses/filter endpoint. Using the track parameter with the hashtag you are interested in, you will receive matching Tweets in real-time.
In order to get started, you will need to create credentials for your Twitter app on https://apps.twitter.com/, then consume the API from your favorite language. The fastest way is to use an existing library which will handle the authentication and the connection to the Twitter API for you.
If you want to use Go, I definitely recommend twittergo by #kurrik which supports the Streaming APIs. For other languages, you can take a look at this page on Twitter Libraries.
You can also use tweepy a python API to access twitter APIS . But first you should have twitter streaming API access for that you should have an account at apps.twitter.com
You will always need to create an app on the Twitter Developer portal https://apps.twitter.com/ as this is where you get to manage your API OAuth keys. As Romain says, the best option here would be to use the Streaming API.
is that possible to display google analytics reports or realtime report on my website page?
i have created google analytics api and tested on the localhost and it is working and redirect url which i given into google analytics api Redirect URIs:
After all the process of google analytics api how do i display analytics
visitor reports on my website page?
How to display google analytics realtime report on my website page?
i want to display Analytics Standard Reports Like (Real-Time-Overview,Audience- Overview,Traffic-Sources-Overview,Content-Overview,Conversions-Overview) Reports Or Chart On My Website?
The real-time reports are not yet possible. If you take a look at:
https://code.google.com/p/analytics-issues/issues/list
On the top of the list is "Access to Real Time data".
Check out EmbeddedAnalytics.
This is a service which allows developers to easily embed GA based charts directly into websites. There is no need to know the API or any other charting software. All you do is create a chart on our site, grab a snippet of code, and embed on your site where you want the chart to show.
(disclaimer - I work with them)
Google has now launched a real time API. It is only in beta, however, you can sign up now, and it should be available to everyone later.
http://analytics.blogspot.co.uk/2013/08/google-analytics-launches-real-time-api.html
Google has launched the real-time API, To embed, Follow the steps, embed the code and have fun .
Here is the examples.
https://ga-dev-tools.appspot.com/embed-api/
You can use following API provided by Google.
https://developers.google.com/analytics/devguides/reporting/
I've played around the the Analytics API and used oauth and managed to pull data from my Analytics account, this wasn't too much of a bother and worked really well.
The problem is I'm building a small "data graphing" service for me clients, this will basically feed data from Google Analytics, Telephone tracking and a few other services into a central area that'll display how many people are contacting them from their website.
The problem is that to use the Google Analytic API you need to be authenticated by oauth, this prompts the user to log into a Google account.
Is there a way in which I can get my GA data without the need to manually authenticate with oauth?
You could try GAPI - Google Analytics API PHP Interface
Here's the Google Code page of this project:
http://code.google.com/p/gapi-google-analytics-php-interface/
Features (as mentioned on the GAPI project page):
Supports CURL and fopen HTTP access methods, with autodetection
PHP arrays for Google Analytics metrics and dimensions
Account data object mapping - get methods for parameters
Report data object mapping - get methods for metrics and parameters
Easy filtering, use a GAPI query language for Google Analytics filters
Full PHP5 Object Oriented code, ready for use in your PHP application
I recently use the great php class call : Google Analytics PHP API. I manage to get it working to get a lot of info and stats for my 25+ website that have analytic
Now i like to get more data like
The page rank the google placement
(where i am on google #325 or #520)
Google Page Rank
Google Indexed Pages
Traffic Rank
Inbound Links
DMOZ Directory
Yahoo! Directory
get a summary (my way) much more like http://websitegrader.com
do you know a php class to do that ?
I guarantee you're not going to find one "class" that does all that for you.
Manually checking your site's rank on Alexa is probably going to be your best source of information on top of what Google Analytics is already giving you.
Google Analytics does NOT require any sort of API.
The site you linked to asks for your Google username/password. I'm flagging this question. I encourage others to do the same.
you can get all from alexa api (Alexa Web Services)
http://aws.amazon.com/awis/
but not free
$0.00015 per request ($0.15 for 1,000 requests)
i thought in the past to build a website to arrange an Arab sites
but arrived at the checkpoint
somme website use awis
www.statbrain.com
www.websiteoutlook.com
www.websitevaluecalculator.com