ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
1 Day Left! - The Alteryx Community will be temporarily unavailable for a few hours due to implementation of the new SSO experience starting tomorrow at 5pm MDT. Please plan accordingly. For more information, read the blog.

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Google Analytics Connector Dimension and/or Metric Filtering

7 - Meteor

Hi All, 

I've been going crazy trying to figure out how I can place filters on either a metric or dimension within the Google Analytics connector itself so when the API call is made to google analytics, it will only return what is specified in the request.


For example, I'm pulling Sessions by LandingPagePath by Date for a client. The connector outputs about 2500 different landing pages per day from this request. Doing this for months or years worth of data takes forever (even after creating this into an iterative macro) so how could I set the GA connector to pull either only landing pages where sessions > 1, or exclude 'checkout' landing pages?


I did find some documentation HERE that shows filters for dimensions and metrics but cant seem to get those to work. Returns an error saying "invalid dimension/metric" (ie.. ga:sessions>1 OR ga:landingPagePath!=checkout).


I'd rather not have to pull all data and filter after the connector, rather just filter within the API call. Has anyone been able to crack this?

5 - Atom

+1, would use the HECK out of this functionality if it were available. 

7 - Meteor



So In looking into GA API documentation all it takes to add a dimension or metric filter is to add a new line in the API call called 'filters'...



Documentation on Filtering HERE


Who woulda thought?.... BUT when I made changes to the GA connector I completely messed up the user interface. Anyone have any idea how to change it back? 

7 - Meteor


Instead of messing around with the GA connector it was easier for me to create a segment within the client's Google Analytics, and then just pull from that segment. Hope this helps others.


Great solution @cmarchese!