Replace multiple values in oogle Sheets for Google Data Studio

79 views
Skip to first unread message

R V

unread,
Jul 2, 2020, 7:04:00 AM7/2/20
to google-analytics-spreadsheet-add-on
Situation:
Our website sells cars online, but this data is very cluttered in Google Analytics, so I'd like to filter per BRAND + MODEL, so without all the other clutter in the link syntax.

Each different car has a new unique URL as shown in below example with the brand and model integrated in the link

The Google Report I configured to show me the pageviews & sessions of all these detail car pages.



The result of the report is the following, but these links will result in a dirty / non-user friendly dashboard view :

Google Sheets:


Google Data Studio:





Is there an 'easy' way to transform the Google Report output links to limit itself to the brand and model ?



The solution I have already found :
This is an insane amount of coding as there are 500 brand-model combinations, meaning 500x 'Substitute' and 500x 'Index 'Find/Replace' per column... There has to be an easier way?





Output 0 =Substitute(A2,INDEX(Find0,1),INDEX(Replace0,1))
Output 1 =Substitute(Substitute(Substitute(Substitute(B2,INDEX(Find1,1),INDEX(Replace1,1)),INDEX(Find1,2),INDEX(Replace1,2)),INDEX(Find1,3),INDEX(Replace1,3)),INDEX(Find1,4),INDEX(Replace1,4))
Output 2 =substitute(substitute(substitute(substitute(C2,INDEX(find2,1),INDEX(replace2,1)),INDEX(find2,2),INDEX(replace2,2)),INDEX(find2,3),INDEX(replace2,3)),INDEX(find2,4),INDEX(replace2,4))
Final =LEFT(D2,FIND("/",D2)-1)



Any help would be greatly appreciated !

Kind regards
Rufus

R V

unread,
Jul 2, 2020, 7:07:54 AM7/2/20
to google-analytics-spreadsheet-add-on
It seems the screenshots did not get attached...
4. COLUMNS CODING.png
3. DASHBOARD.png
1. REPORT CONFIG.png
2. REPORT RESULT.png

verswijv...@gmail.com

unread,
Jul 17, 2020, 5:37:47 AM7/17/20
to google-analytics-spreadsheet-add-on
BUMP, anyone able to help?
Reply all
Reply to author
Forward
0 new messages