kalnyc67 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Overriding user IP in Google Analytics measurement protocol is not considered by filters #482

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Adding the parameters uip and ua to measurement protocol was really a great 
enhancement. Now, we can write server-side code that send GA hits passing the 
client IP as the sender.

I ran a few tests and it seems the filters that exclude some IPs, is not really 
working on the the passed IP value but rather the actual user IP. Did someone 
come across this too?

Am I missing something or is this a bug that needs to be fixed?

Thank you, Hazem

---------------------------------------------------------------------------
NOTE: This issue tracking system is for Google Analytics developer products
only.
If you are not a developer/programmer visit:
http://www.google.com/analytics/support.html
---------------------------------------------------------------------------
Name of affected component: Measurement Protocol

Issue summary:
Overriding user IP in Google Analytics measurement protocol is not considered 
by filters.

Steps to reproduce issue:
1. Create a GA account, property and view. 
2. Create a filter to exclude a certain IP.
3. Write server-side code that sends a hit, using measurement protocol. 
Override the server IP, using uip parameter and send the same IP that the 
filter should exclude.

Expected output:
The hit is filtered out by the IP Filter.

Actual results:
The hit is not filtered out.
The geo data of the passed IP is showing, not the server IP.

Notes:
What I could conclude is that the hit was received correctly and handled 
correctly in some places in the code but not all.

Original issue reported on code.google.com by ha...@e-nor.com on 30 Aug 2014 at 11:48

GoogleCodeExporter commented 9 years ago
Hey Hazem, can you describe the filter you're using?

IP addresses are anonymized (just as if `aip` were used). In other words, if 
you send `uip=1.2.3.4` it will be anonymized to `1.2.3.0` so any specific 
filter looking for `1.2.3.4` will fail to match.

This is mentioned in the `uip` docs, but a note could probably be added as it 
relates to filters:
https://developers.google.com/analytics/devguides/collection/protocol/v1/paramet
ers#uip

Does this sound like it might be your situation?

Original comment by philipwa...@google.com on 3 Sep 2014 at 4:51

GoogleCodeExporter commented 9 years ago
Thank you very much for your reply.
Your explanation makes perfect sense.
If this is not a bug it's a limitation.
Considering the above scenario, I am not sure implicitly forcing the IP 
anonymization, when passing uip parameter, is a must-have feature.
If other legitimate scenarios show up, please consider making the anonymization 
only the default, giving the developer the option to disable it, when needed.

Thank you,
Hazem

Original comment by ha...@e-nor.com on 10 Sep 2014 at 8:54

GoogleCodeExporter commented 9 years ago
I have a similar issue with our offline conversions.

In GA, I have two views set up: an unfiltered one and a "master" one which uses 
a filter to exclude all traffic from our office IP address. The offline 
conversion hits are originating from our office IP address, so I'm using the 
uip parameter to pass the customer's IP address to circumvent the filtering.

Unfortunately, it's not working. All but two offline transactions hits so far 
have been filtered out in the "master" view. The only difference I can see with 
the two that did NOT get filtered is that I also included the ua parameter and 
passed the user agent. Does the uip parameter only work if the ua parameter is 
also passed? Doesn't seem logical.

Original comment by came...@prolifique.com on 24 Feb 2015 at 4:04