-
Troubleshooting Duplicate Column Error in GA4 Property Filter with Google Analytics Data API in R
Hey there! So, I’m tinkering around with the GA Data API (for GA4 properties) using R, but I hit a bit of a snag. When I run the filter line (it’s the last one in the code below), I get this error:
data
has to be uniquely named, but there are duplicate columns in there.I thought I’d nailed the syntax because I used the one outlined here:
Have a look at the code below and tell me what’s throwing it off:
ga_properties <- data.frame(brand = c("mybrand"), property_id = c("123456789")) test_properties <- filter(ga_properties, brand == "mybrand") prop_ids <- test_properties$property_id date_range <- c('2022-06-01', '2022-06-30') sel_dimensions <- c('customEvent:screen_name') sel_metrics <- c('eventCount','totalUsers') dimension_filter <- ga_data_filter(city=="Copenhagen" | city == "London")
Log in to reply.