Realtime HTTP notifications using Google Analytics when user views my page? - http

I was wondering if its possible with Google Analytics to send real-time HTTP notifications to say PHP when a user visits my website. If not, I am curious about any real-time notifications that Google Analytics can send to me when a user visits my site. Thanks!
EDIT::Just came across Piwik and it says that it is realtime... does anyone have any experience with them or using their api?

As far as I know, no. You'll have to use another service or write your own.
Maybe there is a commercial google analytics that may give you this but i don't know.

Just to announce that this feature is very close to be released.
According to their blog (http://analytics.blogspot.com/2011/09/whats-happening-on-your-site-right-now.html), it will become public sometime in the next few weeks.

too late but, you can use imrelay - for free http://indo-mars.com/imrelay/ , just use socket.io /webrtc in your php.

Related

How to enable Advertising Features with Google Analytics API?

We couldn't find any code on Google Analytics Developers about how to enable Advertising Features for acccountId. Is it possible to make such request using API? If this isn't possible then gapi.client.analytics.management.remarketingAudience.insert({ seems pretty useless because you still need to do it manually. Any solution?
The API you mentioned is to create an audience segment.
You can't enable advertising features with API. You can enable it in Google Analytics interface or modifying code (in page or in GTM).

Integrating Google Analytics Report for Behavior Targeting

I would like to retrieve visitor behavior data from Google Analytics on my site. For example, detecting New Visitor or Returning Visitor so i can manage different Site Messages. If i can get the user data metrix, i think we could do a lot of stuff for marketing purpose
I know we can implement our own cookies, but what we had in Google Analytics is more than enough if its accessible, why re-invent the wheel ?
So hope you guys can give me insight if my inquiry is applicable
Unfortunately, you cannot do this with Google Analytics.
You can look at tools such as Google Optimize or Optimizely for personalization, A/B testing.

Google analytics Embeded api with out Oauth authorize

How can i use gapi.analytics.auth.authorize without button..
I need it for customers, to track visits on their subdomain, and I have my analytics code on page, so they can't use button to authorize, need without it, automatically.
Any example?
Your question isn't very clear it is hard to understand what you mean by Button.
I think you mean that you would like to select data from YOUR Google Analytics account and display it on YOUR website.
To do this you will need to use a service account as apposed to Oauth2 (Oauth2 would popup with a new window requesting access). When you create the service account in the Google developer console take the service account email address. Give it access at the ACCOUNT level in the Google analytics admin section. It must be the account level this will then give the service account access to read your Google analytics data.
Quota: I am not sure what you are extending to do here but remember you can only make 10000 requests per day against your Google Analytics profile. After that you are cut off there is no way to extend this number. So I advice you to save the data in the database someplace you shouldn't request the same data more then once.
Example:
I suggest that you look for an example in what ever programing language you are intending to use. Again your question doesn't state anything about what language you will be using. Hello analytics API might be a good place to start but it depends upon the language the PHP one is way out of date I wouldn't bother with it. Also you cant use a service account with JavaScript so that one is out to.
Update figured out button
Embded api I think I have finally figured out what you mean by button. gapi.analytics.auth.authorize is used in the Google analytics embedded api. Which is JavaScript which it is not possible to use with a Service account. So the final answer to your question is
Answer: You cant remove the button from the Google Analytics Embded api the only way to login with JavaScript is to use Oauth2.
Advice: switch to PHP and use a service account to request data yourself. Or give each of your customers access to your Google analytics so they can login themselves.

Can I share my google analytics result to someone else?

I work in a small company and we - as many others = use google analytics to monitor how well/bad our site is doing.
To access this information we put the google account's details (username and pwd) and off we go.
I now want to share this information with one of my clients but I don't want to give him my google account.
can anybody suggest the best way or the best practices to achieve this ?
Many Thanks
Lp
Given that you want to "publish it", you might want to extract the relevant data via the Google Analytics API, which provides read-only access, works just like an ordinary Google Data API--this way you can serve it from your own Site without restriction.
That still leaves the presentation of that data, but at least you have complete control over it.
the client can give you HIS account and you give his account view rights
You create anothe rgoogle account just for read only access, give it read access to your google analytics and send the password that client.
I dont really see the issue here ;)
Check out EmbeddedAnalytics. This is a service tailored specifically to allow you to define nice looking charts against your Google Analytics data and then embed them on to your site. The service utilizes the Google Analytics API.
(disclosure: I work with EmbeddedAnalytics).
You may now use Google Analytics Embed API for the purpose. Clients still do need to have Google account.

track visits from nonbrowser application using google analytics

is it possible use google analytics to track visits from nonbrowser application? will ga be able to recognize custom user agents or other http headers? Anyone has experience in this area? thanks!
No. Only browsers execute Javascript, which is required for Google Analytics tracking. To track robots, you need to get server side logs. AWStats is a good tool for parsing Apache logs, allowing you to track robots and such.

Resources