Mobile app version of vmapp.org
Login or Join
Hamaas447

: Google Analytics Query Explorer OR AND logic I use the following link to create queries for the Core Reporting API of Google Analytics:https://ga-dev-tools.appspot.com/explorer/ Now I want to use

@Hamaas447

Posted in: #Analytics #Api #Google #Reporting

I use the following link to create queries for the Core Reporting API of Google Analytics:https://ga-dev-tools.appspot.com/explorer/

Now I want to use a filter that filters out two types of traffic:
1. filter out a specific type of medium
2. filter out a speciic type of medium in combination with a type of source.

Now I'm using the following filter expression:
ga:medium==organic,ga:medium==cpc;ga:source==google

But the first medium filter also uses the source filter.
So I actually want to exclude the source filter from the first medium filter.

Can anyone help me with this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

1 Comments

Sorted by latest first Latest Oldest Best

 

@Voss4911412

AND and OR are equivalent so it's impossible in that way. More info and examples, you'll find there: developers.google.com/analytics/devguides/reporting/core/v3/reference#OR

But... there is a simple solution. Use ga:sourceMedium to filter out combined specific type of medium with a source. E.g.
filter expression:
ga:sourceMedium==google / cpc,ga:medium==organic

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme