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:
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