Create custom dimension from a substring of another dimension's

ChrisK
New Member

Hello –

I’m looking to create a custom dimension based on the substring of another dimension. I’m ingesting the URL of all pageviews, and I would like to create custom dimension values based on the referrer string.

For example, given the following data set from an existing Dimension (Page_URL):

a.site
a.site/product
b.site
b.site/store

I would like to create 2 dimension values (a.site.com, b.site.com) which would group all of the matching records into those two dimension values.

a.site => a.site
a.site/product => a.site
b.site => b.site
b.site/store => b.site

Thanks for the help!
-Chris

0 1 622
1 REPLY 1

What’s stopping you from doing this in the LookML layer and use your dialect SQL capabilities to do that? Is it just a one-off thing or, as it seems to me, something you could reuse in the future

Top Labels in this Space