AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.5K members online now
2.5K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

GA API to update a filter

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi 

I am writing a java program to mass update my include filter. I was trying to add in the following code in to my program and it looks like the java library is not recognizing the object in bold.

 

I have all required java libraries and I am doing account, property updates etc successfully. But as soon as I add this line in bold, AnalyticsManagementFiltersFilterExpression  cannot be resolved to a type message is appearing...

 

Any thoughts apprecaited.

 

// Construct the filter Expression object.
AnalyticsManagementFiltersFilterExpression details = new AnalyticsManagementFiltersFilterExpression();

details.setField("GEO_DOMAIN");
details.setMatchType("EQUAL");
details.setExpressionValue("example.com");
details.setCaseSensitive(false);