(not set) grouping in google analytics - google-analytics

I'm working with Google Analytics and i've come across a (not set) issue with Content Grouping. I changed my URL's in the month of August, and then most of the URL's went into the (not set) Content Grouping, instead of its specific group. Is there anything I can do to have the URL's put back into their correct grouping?
Also, i'm reporting out this data via Data Studio and I was wondering if there was a query/filter that I could use to have it be grouped into the correct content grouping?

The content groupings you have probably was dependent on the URL. You will need to modify your existing content groupings in GA and change the rules so that it matches the new URLs.
As for reporting in DataStudio, you can use CASE functions in a new calculated field. The cases will be the rules for your content groupings. Example:
CASE
WHEN REGEXP_MATCH(page, "(mypagepath1|mypagepath2|mypagepath3)") THEN "Group 1"
WHEN REGEXP_MATCH(page, "(mypagepath4|mypagepath5)" ) THEN "Group 2"
ELSE "No Group"
END
After that you will use the new calculated field in place of the content grouping dimension.

Welcome to StackOverflow. As #Sonali has already implied, you need to take into account the fact that GA is incapable of setting an 'if not set, use default' value on a dimension. If you can see any way of better interpreting the August data you do have, try using the GA plugin in Google Sheets: if you do that, and then use a Sheets formula to manipulate the data, you can then have GDS access the sheet.

Related

How does one remove numeric id ending for restful URL in Google Analytics?

In Google Analytics, we track urls such as
/app/person/1
/app/person/78
or
/app/person/pet/456
/app/person/pet/65
And we'd like to remove the final Identifier so we can report on the page itself (i.e. /app/person and /app/person/pet)
Is there a way to do this? Thanks!
2 ways:
Search/Replace Filters: this will overwrite the original URLs with the non-numeric ones (if you ever want to know the exact original URL you're screwed).
Content Grouping: this will retain the original URLs, but will create a separate reporting option whereby you can switch from original URLs to your content group (see below example showing the page type, but you can really do whatever you want with content groups, including non-numeric IDs):
In both cases, you'll need a regular expression to handle the conversion: ([^0-9]+)/[0-9]+ should work (note that with GA's regular expression engine you do not need to escape /)
Accordingly the content grouping setup would look like:

Backwards Facing Content Grouping

Need to group some pages on my site together but apparently content grouping would only be forward facing. Is there a way to apply content grouping to prior data or create a calculated column as such which would allow GA to filter and group older data?
Is there a way to apply content grouping to prior data?
No, content grouping only applies going forward.
or create a calculated column as such which would allow GA to filter
and group older data?
No, any data you add to GA is only available as of the moment you create it.
What you can do:
GA:
Use Query Filters (not view filters) or segments: filters/segments don't create any data, they just filter it. So if you create 1 filter/segment per group and query the data, you will effectively have the same data as if you had done content grouping
Use Regex: GA supports regular expression which might help you create the filters you need
Use the API: since applying filters/segments might be tedious to do (and repeat) via the UI, you might want to use the API, for instance via the Google Sheets GA API add-on (see further details below)
Example of Google Sheets GA API add-on query to group some content that would match all pages which start with /foo or /bar (see list of API dimensions and metrics, see legacy filters syntax):
ga:pagePath=~^/(foo|bar)
Once you have figured out 1 query for 1 group you can clone them, query all your data, and then reaggregate it.
Google Data Studio:
GDS has a feature called Calculated fields which effectively allows you to create content groupings which apply to both historical and new data. Most likely you want to do this with a CASE statement:
CASE
WHEN REGEXP_MATCH(Page,'^/(foo|bar)') THEN "Group A"
WHEN REGEXP_MATCH...
ELSE "Other"
END

Google Data Studio filter combining two custom fields

I am trying to join data associated with two custom variables in the same Google Analytics dataset for a filter widget. We have institution names for older data in customVarValue2 and after GA changed the use of custom variables, newer data in Institution. I would like to be able to access all that data (back to October 2011) in one pageview chart and I think I can do that with a calculated field.
I saw on a post in the Data Studio forums that the logical operators don't work so I've been trying to do this with individual lines like so:
CASE
WHEN REGEXP_MATCH(customVarValue2, '.*Denmark.*') THEN 'Denmark!'
WHEN REGEXP_MATCH(Institution, '.*Denmark.*') THEN 'Denmark!'
ELSE 'Other'
END
The goal is to end up with one "Denmark!" field in the widget dropdown where all the data is combined from the two custom fields (customVarValue2 and Institution) to cover the whole date range. I can get it to work with one of the variables and it gives me the choice of "Denmark!" and "Other" with the appropriate date range for the custom variables that I used. But when I put both "WHEN" cases in, I only get "Other" showing in the widget dropdown. I would appreciate any advice you can give.
Thanks,
Sandy
The version below seems to work for me on a different case. Have you checked the case of the custom variable macthes?
CASE
WHEN REGEXP_MATCH(customVarValue2, '.Denmark.') OR REGEXP_MATCH(Institution, '.Denmark.') THEN 'Denmark!'
ELSE 'Other'
END

Content Grouping (not set) issue in Google Analytics

I want to try content grouping in Google Analytics. I have entered a couple of URLs in "Group Using Rule Definition" in Google Analytics and I have saved it without any error.
But when I try it in "Behavior" flow, its giving me "(not set)". Can anyone help me out how to deal with it? Any help would be greatly appreciated.
Thanks!!
This explanation from Google covers it briefly
But the key point is
(not set) is the collection of pages that are not assigned to any group.
If you assign more content groups you should see a reduction in "(not set)" in reports.
If you are entering full URLs in the Group Using Rule Definition area, then you are creating groups of 1 page each.
A better rule is to use something like "starts with" with a partial url "/foo" to group all pages that start with "/foo", or similar logic.
Each content item is placed in the first group that it matches for. If the last group is called "Other Pages" and set to match anything, it will group all pages not collected higher on the list.
https://support.google.com/analytics/answer/2853563?hl=en

Content Grouping not working for me

I have a website which sells cloths under categories "Sarees" and "Dupattas".
I am trying to configure content grouping in Analytics, but it does not seem to be working.
e.g. I have set an extraction by page title /(.[Ss]arees)./
and some of the page which I was expcting to fall under this were:
http://dazzledori.com/Pure-Silk-Chanderi-catid-372030-page-1.html
http://dazzledori.com/Silk-Cotton-Chanderi-catid-372029-page-1.html
But when I go to my reports, I only see "not set" on the same page titles. Can somebody suggest if I am using this feature incorrectly, or there is gap in the regex? Thanks.
Edit: I just tried to convert my extraction into a rule.
So now I have created a single group called "Cloth products", and I created two rules inside it:
1) /(.[Dd]upatta)./
2) /(.[Ss]arees)./
Still not seeing any matches

Resources