KMC Anayltics - Exclude users or players?

Does anyone know if there’s a way to exclude users/admins from generating statistics in Analytics?

We are preparing new players and testing them, but don’t want these test runs to throw off actual user analytics. Is there anything we can do or put somewhere that tells it not to track? Another way would be to exclude a specific site where the plays would be coming from…

Any ideas??



Kaltura analytics is done by parsing the access log looking for calls to the stats service with the collect action, for example: - - [25/Sep/2015:00:05:11 -0400] “GET //api_v3/index.php?service=stats&action=collect HTTP/1.1” 200 372 0/436 “-” “php-client” “-” “-” “” 14431 - - 178 “-” “-” “-” “-” “-” -

The access log fields are defined in /opt/kaltura/app/configurations/apache/conf.d/enabled.kaltura.conf, like so:

LogFormat "%h %l %u %t \"%r\" %>s %O %T/%D \"%{Referer}i\" \"%{User-Agent}i\" \"%{uv}C\" %a \"%{X-Kaltura}o\" \"%{HOST}i\" %P %{X-Kaltura-Session}o %X %I \"%{Content-Range}o\" \"%{X-FORWARDED-FOR}i\" \"%{X-FORWARDED-SERVER}i\" \"%{X-FORWARDED-HOST}i\" \"%{Cache-Control}o\" %{Kaltura_PartnerId}n" vhost_kalt

The easiest thing for you to do is to simply create a test partner and use it while testing, since Analytics are per partner, you can later discard this test partner and replace the player embeds with one directing to the ‘live’ partner.

Alternatively, you can stop automatic DWH by disabling jobs in /etc/cron.d/kaltura-dwh, manually filter out undesired collect calls and then re-enable the DWH jobs.
I strongly recommend the first option however as the second one can be quite error prone.