How can I view individual hits to pages within a GA custom report - google-analytics

I would like to compare some data between a 3rd party analytics tool and GA.
Now I would love to see the IP addresses that Ga is receiving however it seems that they do not reveal this information, fine, however, I cannot find a way to use the flat table in the GA custom report to show me the following if possible;
Full Date Time (Seems as though they don't want you to have this either)
Browser Version
Browser Width & Height
Page (from the hit)
And I would like this data not to be grouped by the metric, this way I can see that if the same user has hit a page 3 times it isn't grouped.
If anyone can help please let me know. If the question is poorly phrased please let me know.
Thanks,
Connor.

This requires some work, and it will allow the breakdown only for future hits, not for hits that are already collected.
To view individual hits you need to create a hit based dimension that is unique per hit. Unless your page has an amazing amount of traffic a timestamp in milliseconds (e.g. new Date().getTime()) will be sufficient (for your report you might want to format that in a nice way). So in the admin section of your GA property you go to custom definitions, create a hit scoped custom dimension, and then modify your pagecode to send the timestamp to that dimension. Hit scoped means it is attached to the pageview (or other interacton hit) it is sent with.
If you want to break down your report by user you need the clientid (clientid is how Google recognizes that hits belong to the same user). Again, send it as a custom dimension.
This does not tell you how many sessions the user had (there is no session identifier in GA). If you need to know that you can create a session scoped custom dimension and send a random number along ("session scope" means that GA only stores the last value in a session, so you don't need to maintain a session id over multiple pageviews, since the last value will be set for all hits within the session). The number of different sessions ids per client id then tells you the number of sessions per user.
The takeaway is that GA only shows aggregated data, and if you want to defeat this mechanism you need to throw data at it that cannot be aggregated further. You might run into other constraints (i.e. there is a limited number of rows per report).

Related

Google Analytics - measuring returning customers after abandonment

I’m wondering if anyone can help me. I’m currently working on a project which involves trying to understand customers who have abandoned one of the stages within a checkout but then returned to the site at a later stage and converted. I would then break this down to the number of days before they returned. I’ve tried creating segments however the data doesn’t seem to be making sense. Has anyone any idea how I’d go about this? Is this even possible in GA or is this something I can only accomplish in BigQuery if at all?
Your help will be very much appreciated.
Google Analytics(GA hereafter) is counting a visitor as a new or returning user by persisting cookie values in client side(in the browser). So once a user is visited, It stores an id which is specific to that user (actually this user means the browser which had been used to visit the website). So when a user visits the site for the first time, GA will store a specific id in a GA related cookie in the client side. If the user visits the website again later in another session, then GA check if there is a client.id for that user stored in the client side. If it found then that user is count as a returning user or New user otherwise.
In Google Analytics, goto Audience -> User Explorer. In there you can see an aggregated view of each user(client.id) interacted with your website and clicking on one client.id will show each user's activities with the website(differentiated by sessions) and will show all the sessions related to that user with the information like time, URL and some other dimension values.
Also if you want to separate out New users or Returning users from each other, you can create a new segment with a condition checking for the User Type dimension against the values "New Visitor" or "Returning Visitor".
To measure returning customers after an abandonment and converted, you can create a segment as follows,
It seems that it's not possible in GA.
There are no metric like "Days between abandoned funnel and conversion" (only "Days before transaction" - between acquisition day and transaction day). So you need a date for abandoned funnel and a date for conversion separately: i.e. you need two reports.
I know solution, but Excel or smth like this is needed if you want to calculate days before conversion.
At first you need to have Client ID as a custom dimension.
Then create custom report contains dimensions Client ID and Date and metric [Your Goal] Abandoned Funnel (Goal with Funnel needs to be set).
And the second report - Client ID, Date and [Your Goal] Complection.
And to merge these tables using Client ID parameter.

How can I query Google Analytics condition on TWO different dates?

I wish to extract (via the Analytics Core Reporting API) all the transactions made TODAY by users that had a specific ga:eventCategory few weeks ago.
I'm looking to see the date of a transaction and all dated of event that are related to that transaction.
If GA was sql I would join by the ga user and take in the dimension both his transactions date and his dimension update date...
Thanks.
Noam.
Like I have indicated in my comment you can segment the data to include only those users who have the specific event. Segmentation works fine with the core reporting API.
Your segment defintion would look like this:
users::condition::ga:eventCategory==[myEventCategory]
(where obviously the thing in [brackets] is a placeholder that needs to be substituted for the event category name). The "users::" prefix means you are segmenting by user scope (as opposed to sessions), so this will include all sessions in the selected timeframe for users who had the event at least in one of their session (even if the event was outside the selected timeframe).
Select transactionId as dimension and some metric (revenue) and todays date and you are done. Or you would be done if this was actually going to work, but there are at least two caveats:
Google Analytics does not work in realtime, so it's unlikely that TODAYs transactions are fully available (Google says it's 24 hours until the data is processed - actually it might happen faster, but you cannot rely on it).
If a user has deleted his or her cookie she won't be recognized as a recurring user and GA will be unable to segment her out. The longer the interval between the event and the transaction the less likey it is that the GA cookie is still present.
So even with a technically correct query it might be that you won't get the data you need.

can google analytics tell me http referrer for each specific goal conversion?

I have a website that allows people to create an account (that is the conversion I wish to track).
I wish to know where a specific person is coming from. I have google analytics installed and have set up the registration page as a goal, but the reporting tells me traffic sources as an aggregated pie chart. It doesn't report down to the user account level to say that 'person with email xyz' came from 'facebook' for example.
What custom variables or mark up would I need to add to GA to report at that detailed level, if that is at all possible?
Otherwise, I will just have to record the first http_referer in a cookie and stick it in a database during the registration process.
Any advice?
Firstly I must ask you, how actionable do you think it is to look at data at that granular of a level? Finding out what % of people who registered came from facebook or some other place is actionable, because it helps you do things like determine where to focus marketing efforts. But individual users? How is this actionable to you? (hint: it's not)
However, if you are still determined to know this, you should first note that it is against Google's ToS to record personally identifiable data both directly (recording the actual value in GA) or indirectly (e.g. - recording a unique id that you can use to tie to personal info stored within your own system). If this is something you don't want to risk, I suggest moving to another analytics tool that does not have this sort of thing in their ToS (e.g. Adobe SiteCatalyst, which costs money, or perhaps you may instead prefer to choose an "in-house" approach, like Piwik)
If you are still determined to follow through with this and hope not to get caught or whatever, Google Analytics doesn't record data like what info a visitor filled out in a form (like their email address) unless you populate that data in a custom field/dimension/metric/event to be sent along with the request. Usually you would populate this on the form "thank you" page (which is usually the same page you use as your goal url or goal event if you're popping and using an event for your goal). So you would populate the email address in one of those custom variables and then have it as a dimension to break down the http referrer by.

Doing cohort analytics on Google Analytics

Suppose I have 65 people that register on January 1, 2012.
I want to find out how many of those 65 people returned to the site that same week. (More generally, if n people signup on date A, I want to be able to find out how many of those n people return in a given date range.)
Is there a way to do this using Google Analytics? If so, how? I am currently getting the user's username for each page hit.
If you only need to track people who sign in then you don't need to get very fancy. You can copy the relevant user attributes, such as sign up date, from your DB to GA using events or session level custom variables.
But if you want to track everyone, including those who don't sign up, then you'll need to use visitor level custom variables (GA cookies).
I explain how to set this up in detail in this post so I'll just highlight the key points here:
First, decide how to layout the data in Google Analytic's custom variables based on your requirements. For example, are you storing retention dates for daily, weekly or monthly tracking? Do you also want to track cohort goals? Partition this data into the available custom variable slots.
Write the cohort data to these custom variables when visitors arrive or achieve goals using Google Analytic's _setCustomVar function. Setting the fourth parameter of that function to 1 indicates you want to do visitor-level (cookie) tracking.
For each cohort you wish to analyze, create an advanced segment in Google Analytics. Using a regex expression in the condition will give you the flexibility to segment for interesting cohorts. ex: "All users whose first visit was the week before Christmas".
Analyze the results with reports by specifying a date range and the corresponding cohort-sliced advanced segments. Another option is to extract the data using the Google Analytics Data Feed Query Explorer or their API.
Once you've put in the work your new visitors will be stamped by their first visit date and nicely fall into each daily or weekly retention bucket. This is what it might look like if you were tracking weekly retention, for example:
This is not a full solution, but here are some points on how I would approach this problem with the help of Google Analytics:
You have to make sure that you somehow store the registration date of each user, either in your database or in a cookie. Then have a look at Google Analytics Event Tracking. You could for example set up a new category based on the registration date. On every page load in your page, you then have to set up this event tracking call, for example like:
_trackEvent("returns", "2012-01-01", "UserId:123123123")
This way you will receive all page views for users that registered on that particular date. To add a date range in this, you have to make sure that these events only get fired for the number of dates after the signup (e.g. 7 days).
After your date range, you will be able to see how many page views and how many users returned - you even know which users came back.

How are dynamic segments in Google Analytics retroactive?

Are dynamic advanced segments retroactive at the session or visitor level? Can it retroactively recalculate session data or can it retroactively recalculate visitor data?
Here is an example as this is a foggy question.
Say I add an event tag to GA today. Tomorrow i run a report where the dynamic segment is for visitors who have triggered the event. The report requests unique visitors over time.
Now, if it is retroactive at the visitor level, the visitor is now tagged as having triggered the event. The report should show data going back in time (assuming these are not first time visitors). In this scenario GA will see if the visitors tagged arrived 2 days ago even though the events did not exist yet.
This answer no longer reflects up to date information.
Advanced Segments are not queried at the visitor level, and are thus not able to query data across sessions. They query particular sessions (or, visits), not visitors.
So, if you visit the site today, trigger an event, and then visit the site again tomorrow and don't trigger the event, an advanced segment for that event will be a query that says "Show me all sessions in which this event was trigger"; the former will be included and the latter excluded.
Similarly, if you do an advanced segment for a particular page, what you're saying is "Filter down to all the sessions in which this page was viewed" (this can be confusing for people who apply an advanced segment for a particular page, and the result contains more than just that page.)
However, they are dynamic and can be applied to the retroactively. In other words, the results of the advanced segmentation are not contingent on when the advanced segment itself was created. (This stands in contrasts to, say, account filters, that do not apply themselves retroactively.) They tend to be calculated on the fly; you'll notice that complex advanced segments can often take a long time to process, and tend to increase the likelihood that Google Analytics will return sampled (or, "fast access") data.
There is no way to use advanced segmentation to query across sessions.

Resources