OCHA-DAP / hdx-ckan

A repo for HDX's configurations and extensions to CKAN
Other
75 stars 24 forks source link

Exclude 'Internal Traffic' from Google Analytics #2338

Open luiscape opened 9 years ago

luiscape commented 9 years ago

@amcguire62 asked the other day about the possibility of excluding "Internal Traffic" from our Google Analytics. I checked Google Analytics and there is a way to do that based on IP addresses (https://support.google.com/analytics/answer/1034840?hl=en).

I would think that the bulk of our internal traffic comes form the Dev Team. I suggest that the devs fill-in their IP addresses on this Google Doc so I can add them to Google's exclusion list.

@teodorescuserban, let me know if there are any issues with the suggestion above, re security issues.

@cjhendrix, let me know if the work-flow sounds OK or if you'd like some other approach implemented.

teodorescuserban commented 9 years ago

It is not doable very easy. FIrst, because at least in Romania we have dynamic allocated IPs (and this can be circumvented by Dynamic DNS only) Second, the devs are working from various locations (including work hubs). Third, I suspect there is much traffic on stag from devs, but not too much on prod.

One idea would be to try and see if you can exclude traffic based on browser's User-Agent.

There is a plugin for Chrome (and most likely for FF too) that can change the User-Agent sent on certain URLs.

This way, if all devs are installing that plugin and configure it that for hdx sites the User-Agent will get an extra string like "HDX Personnel" that would solve the issues without making Ip lists.

User-Agent mangling is cool too. :)

As another nice use-case: I was letting @davidmegginson and @takavarasha to publish resources on prod before launch by telling them to configure a special User-Agent to bypass the password authentication. They were updating the cpan datasets, so they needed to use ckan api key (one Authorization header); as a result, there was no way to use a second Authorization header so User-Agent OR IP addresses were the only possibilities.

I hope GA will let you ignore some User-Agents.

On Tue, Feb 17, 2015 at 5:52 PM, Luis Capelo notifications@github.com wrote:

@amcguire62 https://github.com/amcguire62 asked the other day about the possibility of excluding "Internal Traffic" from our Google Analytics. I checked Google Analytics and there is a way to do that based on IP addresses (https://support.google.com/analytics/answer/1034840?hl=en).

I would think that the bulk of our internal traffic comes form the Dev Team. I suggest that the devs fill-in their IP addresses on this Google Doc https://docs.google.com/spreadsheets/d/1XcML3mnXpBwEj_CugHdagPN3sYgfkqybUkP-x0WRX6Q/edit#gid=0 so I can add them to Google's exclusion list.

@teodorescuserban https://github.com/teodorescuserban, let me know if there are any issues with the suggestion above, re security issues.

@cjhendrix https://github.com/cjhendrix, let me know if the work-flow sounds OK or if you'd like some other approach implemented.

— Reply to this email directly or view it on GitHub https://github.com/OCHA-DAP/hdx-ckan/issues/2338.

luiscape commented 9 years ago

@teodorescuserban Got it. Great comments!

I am not sure GA of any other solutions on the GA site. But I can investigate further based on User-Agents. I'll take a look if there are plugins for such -- there must be! I'll report back here when I find something useful.

@amcguire62 Please let me / us know about how important this is for the allocation of priorities.

teodorescuserban commented 9 years ago

Excelent!

On Thu, Feb 19, 2015 at 6:26 AM, Luis Capelo notifications@github.com wrote:

@teodorescuserban https://github.com/teodorescuserban Got it. Great comments!

I am not sure GA of any other solutions on the GA site. But I can investigate further based on User-Agents. I'll take a look if there are plugins for such -- there must be! I'll report back here when I find something useful.

@amcguire62 https://github.com/amcguire62 Please let me / us know about how important this is for the allocation of priorities.

— Reply to this email directly or view it on GitHub https://github.com/OCHA-DAP/hdx-ckan/issues/2338#issuecomment-74997521.

danmihaila commented 8 years ago

maybe not an issue if we move to mixpanel.