Combining similar URLs in Google Analytics

前端 未结 1 1703
情深已故
情深已故 2020-12-21 17:05

I have various articles that come in different format types (ex: pdf, html). I\'d like to create a filter in my Google Analytics account that will simply take off file types

相关标签:
1条回答
  • 2020-12-21 17:54

    first I would recommend keeping at least one profile where you keep this information separately; you'll want to know what format people are consuming the articles in so you know what kind of content to create.

    Next, you need to create an advanced profile filter. Here's the Google article about them.

    And here's a GPF thread about the same question.

    To tailor it to your needs, your first field might look something more like this:

    (\/site\/[0-9]{1,2}\/[0-9]{1,2}\/[0-9]+)($)?|\.html|.\pdf
    

    ...Depending on the number of numbers in each folder (I have it set up to accept 1 or 2 numbers like how you have it written). The end part ($)?|\.html|.\pdf says, "match nothing at the end, OR .html OR .pdf"; you could change the specific file extensions to .* to match all file types.

    Then just use $A1 as in the example provided for the output; this signifies that you want to use only what's in the first set of round brackets in field A

    Sometimes it takes some playing with but it's pretty powerful :)

    Real time reports can be your friend to catch what's coming in without having to wait a day to see if it's working.

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