Open michaelhidalgo opened 7 years ago
I am having the same issue however I understand this is the "expected" behavior since the requests are coming from the server and not the client (I use this in a chatbot where everything runs on the server).
It would be nice to be able to override this somehow.
You can, the Measurement Protocol parameter uip
is meant for IP override: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#uip
Hi @jtillmann, does this module support passing these values to override IP and User Agent? If not, I can work of it and send you a pull request.
I'm think, these override parameters can be sent as part of visitor options. Something like this:
var visitor = ua('UA-XXXX-XX', 'CUSTOM_CLIENTID_1', {uip: "", ua: "" });
They can not be provided to the visitor options, they need to be provided as parameters to track calls or as persistent parameters.
Great! I didn't see that part of the documentation. This module already supports passing override parameters.
Currently experiencing this issue on my fargate instance on AWS. I am setting the vistor using visitor.set("uip", ip)
with the proper ip and its using my servers IP instead. I think the request headers is being declared as source of truth instead of the visitor uip.
@michaelhidalgo using version 0.4.23 seems not have the issue. In my case I needed to downgrade the package.
Could you check the debug output? There should be no difference between .4 and .5 in this regard.
Hi folks, this is just a question.
I deployed an application with universal-analytics and the application was deployed into a cloud server, however when accessing the site from Costa Rica, I can see in Google Analytics that the location of the traffic is the on from server, not my remote location.
I used the same samples from this repository and I was wondering if i need to pass somehow the remote ip so it can use my location instead of the server's one.
Thanks.