Create a Google Analytics view filter that excludes hits with missing fields

前端 未结 1 1630
终归单人心
终归单人心 2020-12-21 09:01

I have a mobile iOS app that uses Google Analytics.

Recently I have been receiving hits in my reports that are clearly not coming from my app. I guess someone must b

1条回答
  •  醉梦人生
    2020-12-21 09:53

    I don't have a mobile view to test with, but based on web tracking the following seems to work:

    • Create a new filter, custom, advanced
    • Field A : Application ID
    • Extract A : (.*)
    • Field B : leave empty
    • Output to : Custom field 1
    • Constructor : $A1
    • Make sure that "Field A required" and "Override Output Field" are checked

    • Create a second filter, custom, include

    • Filter field : Custom Field 1
    • Filter Pattern : Your application bundle ID (e.g : com.mycompany.MyAppName)

    It seems advanced filters do recognize if a field is empty via the "Field Required" setting. So the custom field is set only when the field is not empty, and you can subsequently use a second filter to include only visits that have the field set (thereby excluding hits that haven't the field set)

    To illustrate my less than brilliant instructions, the following worked for me:

    First Filter


    Second Filter

    0 讨论(0)
提交回复
热议问题