Tuesday, March 11, 2014

Filtering metrics in Google Analytics Connector

You can create a specific metric in KPI Watchdog filtered by any Google Analytics dimension via the Filter field using the standard GA codes and expressions.

Here are few examples how to use it.

For instance, if you want to see the number of users visiting your Contact page from United States and mobile devices only:

You simply add to the Filter field:
ga:pagePath==/index/contact; ga:isMobile==Yes; ga:country==United States



HOW TO CREATE GOOGLE ANALYTICS FILTER 

 Syntax:
1) Dimensions
 ga:pagePath==/index/contact;ga:isMobile==Yes;ga:country==United States

Only specific Country- ga:country==
Only specific Page- ga:pagePath==
Only visits from Facebook- ga:socialNetwork==Facebook
Only Mobile devices- ga:isMobile==Yes (The possible values are Yes or No where the first letter must be capitalized)
All other dimension codes 

2) Regular expressions

ga:pagePath=~contact$; ga:isMobile==Yes; ga:country==United States

== exact match
=~ match based on regular expressions
!= does not match
!~ does not match regular expression

 Examples:
- Number of visits of specific URL, e.g. Contact Page of KPIwatchdog.com ga:pagePath==/index/contact
- URL starting with index ga:pagePath=~^/index
- URL ending with contact ga:pagePath=~contact$

All other regular expressions 

 3) For combination of more conditions
comma (,) means OR
semicolon (;) means AND

Combination OR (,) (starting with index or ending with contact) ga:pagePath=~^index,ga:pagePath=~contact$ Combination

AND (;) ( visited by mobiles only, from US)
ga:pagePath=~contact$;ga:isMobile==Yes;ga:country==United States

You can test your filter settings in the Google Analytics debug console before using it in KPI Watchdog: http://ga-dev-tools.appspot.com/explorer/

We can help you to write the filter. Contact our support.