0
votes

I'm trying to create a new metric in Google Data Studio. What I want to do is to have a metric that count the number of sessions to specific pages. Say I have two pages in Google Analytics and I want to calculate the sessions to these pages into one metric. I'm trying to do this with calculated fields in Google Data Studio but can't seem to get it right.

Here's my code so far:

CASE
    WHEN sessioner  IN 
    REGEXP_MATCH(page 1|page2) THEN "Name"
    ELSE ""
END
1

1 Answers

1
votes

I think you're trying to get something like the following:

CASE
WHEN REGEXP_MATCH(sessioner, "page 1|page2") THEN "Name"
ELSE ""
END

Where sessioner is your current page title dimension, "page 1" and "page2" are page titles and name is the new page title grouping.