Analytics on a PHP API - php

I recently completed my first API in PHP. It is hosted at a public URL and accessed by a couple of my own mobile apps and websites. Based on a couple of parameters passed in, it pulls some data from my database and returns some JSON.
I would like to know some details about how often the API is accessed, and by what kind of clients.
Can I use google analytics for this? I have used it successfully on some websites in the same domain, but when I include the analytics php link and access the API, nothing is recorded.
Any gotchas I could be missing? Or is Google analytics only useable on web pages?

Google analytics isnt just for montiring websites, you can also use it to monitor mobile applications.
You might be able to monitor your API with the Measurement Protocol this should let you send info about the preformance of your api, and log the things you are talking about.
Note: I havent tried it but would love to hear from you if this works.

Related

Does my Facebook app need to be made live?

I am currently building an analytics dashboard that consumes client data from various API's (Google Analytics, Mailchimp etc).
Now I'm at the point of hooking it up to the Facebook Graph API (v3.x) and I am currently able to pull in a pages fan_count utilising a Long Lived token whilst the App is in development mode.
My question is - this app isnt going to be publicly accessible and only provides my Laravel installation with this fan_count metric so do I need to worry about putting it into Live mode and submitting it for review? As far as I understand, I can dynamically request the access to token to be refreshed anyway so in theory I dont see any reason for me to ever need to make the app 'live'.
Just looking for confirmation that my understanding is correct.
Thanks
Jay

Automate posts in Google+ page through PHP/REST API

I am working on web application which will help to schedule the post in social sites like facebook, twitter and google plus. As far as I researched in the internet, it seems Google is not providing any api for writing streams neither at Personal profile nor at Google Pages. And it has provided the api access only to limited apps like hootsuite, buffer.
My question is, Is there any third party (even paid) APIs which will provide me this functionality ? Or, by any chance is it possible to request google for api access similar to the one, it provided for apps like hootsuite,buffer ?
The Buffer API does allow you to schedule tweets automatically. It doesn't seem to support programmatically scheduling updates for other social media platforms, which is what I'm currently trying to do.

Programmatically change Google Voice forwarding settings

I've got an incredibly limited calling and data plan on my cell phone, and spend most of my waking hours in front of a computer with an Internet connection. With Google Voice able to route calls through Gmail, it seems silly to pay for minutes on my phone.
I'd like to use something like Tasker on my smartphone to change my Google Voice forwarding settings automatically so that calls are only routed to my cell phone when I'm not at a computer. The trigger rules are simple enough, but Google Voice doesn't have any official API for things like this.
Has anyone had any success with changing Google Voice settings via some hacked-up API? I've seen a couple that do things like place calls and send SMS messages, but all I need is to change settings, which the ones I saw didn't support. Perhaps a little documentation on how Google Voice handles web requests currently that I could use to change things from a PHP script that I could then call from my phone?
Bonus points if I can use some sort of long-lasting login token rather than having to store my Google password in cleartext.

Google Analytics API got me completely lost

Until recently we have been using the old gapi php class to extract Google Analytics data from a variety of sites that we manage.
In a nutshell at night the sites download the Analytics data and stores it locally. Until recently it worked beautifully but all of a sudden we started receiving all sorts of weird errors like CaptchaRequired.
Anyway I've done some reading and got the impression that it was time we move to the new Google APIs platform and while I have tried to follow the HelloAnalyticsAPI tutorial we initially got a 403 error but now after leaving it for a while when I try and run the app I get redirected to Google to login.
I just don't seem to be able to get my head around it. We need to completely automate this process so redirecting to login on the Google site isn't going to cut it.
Can anyone help? Anyone seen these issues?
Use google api client for php, it's easy
http://code.google.com/p/google-api-php-client/
And dev guide for analytics (V3):
https://developers.google.com/analytics/devguides/config/mgmt/v3/
Google sends Captcha responses if they are unsure about the authenticity of the request. This can be caused by multiple requests from the same IP for various different accounts, use of the ClientLogin authentication mechanism, and even weak passwords on the account you are logging in to.
To prevent them, I would recommend using OAuth 2.0 for the authentication - there are other security benefits to using this too.

Publish google analytics report in real time

Hi is there any way to put into our web-sites an iframe, or something that show us a miny report of our site in real time?
Google Analytics Reporting API
http://code.google.com/apis/analytics/docs/gdata/v3/gdataGettingStarted.html
Google Analytics data is constantly collected but you will notice via usage that Google doesn't process all data in real-time so it may not help you achieve your objective. Instead, I would recommend something like Piwik that does report in real-time.
Piwik is also open source with an API that will allow you to develop either a plug-in or integrate it into your own app.
Note that Piwik is not hosted as Google Analytics is, you install Piwik on your own hosting environment and this is a big difference to some people.
I hope that this helps you!
Megalytic enables you to embed a mini analytics report in your site or blog. Here's a demo: http://blog.megalytic.com/embedded-client-pages. More details here. Handles Google Analytics, Facebook, and Twitter.
For publishing Google Analytics report real time, Google has launched new API. Its Google Real Time API for Google Analytics.
With this you can perform real time website dashboard. To get start development check it https://developers.google.com/analytics/devguides/reporting/realtime/v3/devguide
This is very similar to Google Analytics, with this you can extract data which are available in the form of dimensions and metrics at Google Analytics account.

Categories