Google Analytics Exclude Filter

nshively
nshively Member
edited May 2021 in Connectors

I'm working with a very large data set where most of the data is not tied to a GA Campaign. In order to reduce the amount of data I'm working with, I'd like to filter out all rows that do not have the value "(not set)".

My current formula:

"

{

  "dimensionFilterClauses": [

    {

      "filters": [

        {

          "dimensionName": "ga:campaign",

          "operator": "EXACT",

          "expressions": [

            "(not set)"

          ]

        }

      ]

    }

  ]

}

"

I've tried replacing "EXACT" with everything that I can think of to exclude it including: "EXCLUDE", "NOTEQUAL", "NOT_EQUAL", "DOES_NOT_EQUAL", "NOT_EQUAL_TO", "!=", "DOES NOT MATCH", "DOES_NOT_MATCH", "DOES_NOT_CONTAIN", "DOES NOT CONTAIN".

None of these seem to work. Each time I get the same error:

"Domo is ready, but Domo received an error requesting the data. (Bad/Malformed Request). Invalid value at 'report_requests[0].dimension_filter_clauses[0].filters[0].operator' (type.googleapis.com/google.analytics.reporting.v4.DimensionFilter.Operator), "EXCLUDE""

Tagged:

Best Answer

  • nshively
    nshively Member
    Answer ✓

    Thankfully, one of my developers was able to help me out. Here's the solution:

    ""not": "true"," has to go exactly before "operator":


    {


      "dimensionFilterClauses": [


        {


          "filters": [


            {


               "dimensionName": "ga:campaign", "not": "true",


              "operator": "EXACT",


              "expressions": [


                "(not set)"


              ]


            }


          ]


        }


      ]


    }

Answers

  • nshively
    nshively Member
    Answer ✓

    Thankfully, one of my developers was able to help me out. Here's the solution:

    ""not": "true"," has to go exactly before "operator":


    {


      "dimensionFilterClauses": [


        {


          "filters": [


            {


               "dimensionName": "ga:campaign", "not": "true",


              "operator": "EXACT",


              "expressions": [


                "(not set)"


              ]


            }


          ]


        }


      ]


    }