Google Analytics Custom Variable/Value Report (How?) - google-analytics

I was able to setup Google Analytics to send custom variables that I can track.
I'd like to generate a report with UserId / Value and Display all of the pages
that user viewed. (Similar to reports I have seen with IP address on one column,
and viewed pages on the other)
Custom Var 1 : label:'userId' value:'17' scope:'1' (from Chrome Analytics tool)
Google Analytics reporting is pretty complex, so I'm hoping I can get some suggestions on how to create such a report.

i'm battling through google analytics aswell it can be really useful but to get exactly what you want can take some time. This isn't an answer as much as its a list of a few links that i have used along the way and hope they help
http://ga-dev-tools.appspot.com/explorer/
In here if you put ga:source ga:referralPath ga:customVarName(n)
This stack overflow answer may also help
Create google analytics profile by filtering using a custom variable
i'll have to look into this myself when i m using custom variables but it look like the advanced segment section may be the way to go.
And you ve probably already seen this but its quite a nice article on custom variables
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables
Let us know hwo you get on...

I think you're going to want to create an advanced segment including your custom variable. This should narrow the data to only that which includes the variable. You can then look at whatever reports you want within that segment.
Using regular expressions should let you better tune the scope of the segment.

You can do this easily in the Megalytic reporting tool. There are widgets that let you create reports which segment data by custom variable. For example, Traffic by Custom Variable, Conversions by Custom Variable. Disclaimer: I am a founder of Megalytic.

Related

How to analyze multiple query parameters in Google Analytics

I'm setting up Google Analytics for a website where a user can find an event to attend (concerts, plays, etc.). The results can be filtered by 5 different parameters.
So, unfiltered results would look like: example.com/event-finder/
And filtered results showing concerts in January or February would look like: example.com/event-finder?type=concert&month=jan,feb
I'm struggling to figure out the best way to use the query parameters in Google Analytics to analyze filtering behavior.
Example questions I'd want to be able to pull answers for:
What percentage of results were filtered by type?
What percentage of results were also sorted by month?
What is the most common type filtered by?
I have full access to both Google Analytics and Tag Manager but I suspect I shouldn't do this with events or custom dimensions and that there's got to be a way to use the query parameters to do this in a clean way.
I've tried to use a new view and site search to group the types of filters. Seems like it could work, but seems hacky and limited.
I've considered pushing those values into custom dimensions, but that too seems like overkill.
I've considered pulling content reports into Google Sheets and sorting through things there, but I'm 1) not entirely sure how I'd do that and 2) suspect there may be an easier approach.
Let me know if you have any questions or need more clarification. Thanks!
Have you tried to use "category parameters" when configuring site search (admin -> view settings)? You could set the "type" as a category parameter. You can also enter multiple parameters in there.
Check this screenshot of site search configuration

Google Analytics Absolute Change Sort in Custom Reports

I have a problem with my Custom Reports in Google Analytics. I'm trying to compare periods but it seems impossible to use Absolute Change sort within Custom Reports. Instead, the same option is available in classic reports. Is absolute change sort option available for custom report? Thank you in advance for your help.
Edit: Unfortunately I can't attach any photo, but I will try to explain better. As you surely know in Google Analytics I can compare data with a previous period. Analytics allows the user to sort the compared data through several Sort Types. There are three Sort Types available: Default, Absolute Change and Weighted. Each one of these takes into account different algorithms to sort data. You can switch to a different sort type just by using the drop-down menu placed beside "Secondary Dimension", above the results table. So, I checked out that In Custom Reports the "Absolute Change" option is never made available: when I try to switch from Default to Absolute type, the entry "Absolute Change" is disabled, so I can't select it. It seems to be a trivial feature of Analytics, and I'm not sure whether it is a limitation of custom reports, or maybe if I configured something wrong.

Mixable metrics and dimensions in google analytics

I'm doing some complex reports for google analytics and would like to ask you if the following is possible. The client wants to have just organic data for a bunch of metrics. Like pageviews, visitBounceRoutes, etc. The query I ended up with is the following:
https://www.googleapis.com/analytics/v3/data/ga?dimensions=ga:source,ga:medium,ga:keyword,ga:day,ga:month,ga:year&end-date=2013-11-20&fields=columnHeaders/name,rows,totalResults,totalsForAllResults&filters=ga:medium==organic&ids=ga:79067749&metrics=ga:pageviews,ga:pageviewsPerVisit,ga:visitors,ga:avgTimeOnSite,ga:newVisits,ga:visitBounceRate&start-date=2013-10-20
However the response is as follows:
'{"totalResults":0,"columnHeaders":[{"name":"ga:source"},{"name":"ga:medium"},{"name":"ga:keyword"},{"name":"ga:day"},{"name":"ga:month"},{"name":"ga:year"},{"name":"ga:pageviews"},{"name":"ga:pageviewsPerVisit"},{"name":"ga:visitors"},{"name":"ga:avgTimeOnSite"},{"name":"ga:newVisits"},{"name":"ga:visitBounceRate"}],"totalsForAllResults":{"ga:pageviews":"0","ga:pageviewsPerVisit":"0.0","ga:visitors":"0","ga:avgTimeOnSite":"0.0","ga:newVisits":"0","ga:visitBounceRate":"0.0"}}'
Can the dimensions ga:source,ga:medium,ga:keyword be mixed with the above metrics? It seems they can't since if I omit them the API returns an array of values 1 per each day within the specified range.
Where can I find more information about this and what categories are mixable? https://developers.google.com/analytics/devguides/reporting/core/dimsmets just shows all the available metrics but do not explains how they are combined and which one would be valid requests. I'm new at the analytics API and would be great any kind of help or guidance
Thanks a lot
Google Analytics Query Explorer is your friend for playing around with analytics dimensions/metrics/filters ;-)
Try http://ga-dev-tools.appspot.com/explorer/?dimensions=ga:source,ga:medium,ga:keyword,ga:day,ga:month,ga:year&metrics=ga:pageviews,ga:pageviewsPerVisit,ga:visitors,ga:avgTimeOnSite,ga:newVisits,ga:visitBounceRate&filters=ga:medium%253D%253Dorganic&start-date=2013-10-20&end-date=2013-11-20&max-results=100
Some thoughts:
Those dimensions & metrics should work -- maybe there was no organic data recorded during that time range?
Try removing the ga:medium==organic filter and see what your data looks like.
Does the profile you're using (ga:79067749) have any filters on it? If so, maybe try a different profile that has unfiltered data. (Analytics best practices -- make sure you have a profile with no filters applied that captures all data.)
As Mike said, there is no problem with the combination of metrics and dimensions you are using.
If you are entering the URL query directly in the browser problem might be the lack of URL encoding in your query string. For example, you need to convert == to %253D%253D
For example, instead of ga:medium==organic, you need ga:medium%253D%253Dorganic
If you build your query in the Google Analytics Query Explorer as Mike suggests, you can grab the direct link to your report by clicking the link symbol in the upper left:

Google Analytics segmentation customvar vs uri

I want to be able segment analytics data by company once my customers have logged into my website. Being very new to analytics, it seems like there is a couple of ways I could do this.
Set a visitor level custom variable that would signify the company. For instance, _setCustomVar(1, 'customer', 'ABC Corp', 1)
Pass in a custom Url to my _trackPageview calls whose first segment would signify the company. For instance, _trackPageview('/ABCCorp/the rest of the document path, querystring, etc.')
It seems you can't filter on a custom variable so I could not create a view\profile for each company but I could use Segments and Custom Reports off an 'All Web Site Data' view to do that instead.
Going the custom url route seems to be more flexible since I could either filter or use segments.
Are there any other pitfalls or reasons to suggest using one of these two approaches over the other?
This use case is better suited for custom variables.
Changing the URL will make it more difficult to do things like "How many home page views did I get" or "What do clients usually do after they login".
Also, you can create custom reports based on the information you're passing back and include the custom variable information as the first key. Pretty easy to duplicate GA's current top reports in a custom report using the custom variable as the main dimension.
Agree with Tom that CustomVar is a much better and cleaner solution.
You might want to switch to new Universal Analytics and use Custom Dimenions instead. It's even better and you can set up property filters with Custom Dimenions too, so this should cover all your needs.

Google Analytics custom variables, data fed via URL

I've been asked to set-up some custom variables but as I'm new to it, have no idea on how to get started. I have researched as much as I can but am getting confused.
Here's what I need to do:
An app generates a unique URL in the form http://www.example.com/folder/?userID=12345&BookTitle=ABCDE&DateAndTime=201208080800. I then need the custom variables from the URL ('UserID',
'BookTitle' and 'DateAndTime') to be passed to Google Analytics so I can track which users of the app are visiting the page at that URL.
I've looked into setting up custom variables but don't understand if I need 3 separate lines of code for the 3 separate variables nor how I can pass the various elements of the URL through to these.
Can anyone shed any light on how I might go about doing this?
Many thanks for any help in advance.
-Jack
Never mind. It turns out this kind of usage is against Google Analytics' TOS.
Going about it a different way by asking the user for some info up-front instead.
Google's ToS has changed. You can do this now as long as the UserID is internal to you and cannot be used to identify the customer (by Google).

Resources