Collect data through google analytics api - google-analytics-api

I searched the web for a long time but I didn't find an answer for my question. Maybe it's general not possible what I try to do or I'm searching with the wrong keywords. If an anonymous user go to my website, google analytics creates the _ga cookie to identify this user later. This cookie holds an identifier. I want to use this identifier to collect more information about the user through the google analytics API. Maybe it's possible thorugh filters of the google analytics api?

Related

How can I show users Google analytics data, on my website?

I have a SEO website, and want to show google analytics data of users.
I can retrieve my own website google analytics data via google Reporting API version 4 php client , but how can I retrieve others Google analytics data ? Users after registration gives only theirs email and tracked website url, what else I need to make php client request ?
How can I do it ?
To show the Google analytical data. You have to add the website url into your Google analytical account.
You must be the owner of your account. Add as many websites as you wanted
to add the website of users.
You have to follow the steps as you added your website.
That means user has to add the code into their website which will be provided when we add a new website in Analytical account.
Once added the data will be shown to the main account holder.
then you have to provide the access to the User whom you want to show.

Can google analytic API provide all info of all pages of a website?

I am new to Google Analytics. I would like to get all information (Unique and Total Visitors, Redirecting URL etc) of a Profile, which has url like www.someurl.com/profile/unique_profile_id
So I can easily have unique url for each profile, but as I am new to this. I don't know where to start.
API docs is good but confused where to start. If some can suggest small source of getting started with what i mentioned it will be very helpful.
Thanks in advance.
I come up with this query, but still I am not understanding ga:ids. This ga:id is for my home page www.mydomain.com
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A90283827&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Apageviews%2Cga%3AuniquePageviews
Let's suppose my site have 1000 user and their profile has url as I mentioned above. So what will be ids for that each profile to query.
I think you are miss understanding how the Google Analytics API works. The api returns raw data back from Google Analytics in the form of Json. It will be up to you to format that data.
What I want is that how can I access data of each page that is
currently available in my site.
I sugest you look at ga:pagepath by adding this dimension you will be able to request data by the page. for example pagepath, sessions will give you the number of sessions by the page path. You may want to try testing using the query explorer so that you can get back only the data you need.

Get Adwords keyword that lead user to the page from Google Analytics API

I asked a question about how to determine keywords from which the user came to the page.
I was suggested to link Google Adwords with Google Analytics and use Google Analytics API to pull the keywords.
What API methods can I use to do this?
I seem to have found the answer to my question: http://certifiedknowledge.org/blog/using-adwords-dynamic-parameters-in-links/

Integrating Facebook into Google analytics

I want to add the 'Log in with Facebook' option to my website, however I'm unsure how to integrate the information gained when someone logs into my website with Facebook with my current Google Analytics.
Is it possible to link up a visit in Google Analytics with a user who has logged into the site with Facebook to enable me to see things like age, gender etc?
Any help you can give me on this would be much appreciated.
Thanks,
Ben
you may have to do this via a redirection or possibly a frame.
Google Analytics does nolt track individual users, it provides anonymized data. So at the top level, no you cannot do this. However, there are a few more things avaiable to you. One: Facebook provides facebook insights, their own tracking suite, that will give you demographic information on the users of a facebook app or fan page. You site will effectively become a facebook app when you use their user authenication, so you will be able to get insights tracking on you site. At the present moment, facebook insights and google analyitcs do not itegrate or share data. Facebook insight also provides anonymized data, so you will not be able to identify an individual through the tracking.
The final option is, now that you are tracking users through login, you can implement your own tracking info on your site to see what individual users are doing, and attempt to track their preferences.
Its also entirely legal (in the United States at least) to buy access to marketing data and use use your registered user name pool to get additional information.
If you wanted, you could set up a "funnel" in Google.
When a user logs in through Facebook, you could send them to a specific page and then track their progress from there...
http://www.google.com/support/analytics/bin/answer.py?answer=55515
So using this you could get the percentage of users who log in through Facebook... etc.
But to collect information other than that, you would have to get the correct permissions documented here eg. user_birthday (to get the user's Birthday) and query the Graph API from there, thus implementing your own tracking of users.
You can query the Graph API using the various SDKs that Facebook provide explained here.
First of all you should check out this Google document. It explains, how you set a custom unique user id via google analytics.
Further you've to send an event to google analytics (e.g. 'fb_login') via the callback function of your facebook login function.

How to access a feed with historic items (like in Google Reader) of a given feed url without authentication?

One feature of Google Reader is that it maintains a history of all items of a subscribed feed and you have access to those items when you keep scrolling down the list.
In contrast if you visit the original feed from a blog or a news site, the feed will only contain the latest 10-20 posts, but Google Reader can show you more than that.
This is a very handy feature and I was wondering if there is a kind of API available to access the RSS or ATOM Feed as displayed by Google Reader.
I came across this site that describes an unofficial API for Google Reader:
http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
And it includes the API method I was looking for:
http://www.google.com/reader/atom/feed/url of feed?n=number of items (default 20)
This works – however the drawback is that you need to be authenticated first.
I am looking for a simple solution to access a feed with all historic items of a given feed url from Google without the need to be authenticated. The idea is to use this as an input for further processing (e.g. in Yahoo Pipes)
You can instead use http://www.google.com/reader/public/atom/feed/<escaped_feed_url> to get at this data without needing authentication.