Google Analytics API: filter by URI?

StackOverflowNewbie picture StackOverflowNewbie · Nov 22, 2010 · Viewed 32.1k times · Source

My site has user profiles that are accessible via URLs that look like this: www.domain.com/profile/123/.... I want to show users page view statistics of their profiles, but need to be able to do wildcards.

For example, this works:

filters=ga:pagePath==/profile/123/

The problem is that there are potentially other URI segments that follow /profile/123/. I want to do something like this (does not work):

filters=ga:pagePath==/profile/123/*

Suggestions?

Answer

Yahel picture Yahel · Nov 22, 2010

Use the 'Contains a match for the regular expression' operator (~) from the Dimension Filters.

filters=ga:pagePath=~/profile/123/*