stape-io / facebook-tag

Facebook tag for Google Tag Manager Server Side
https://stape.io/how-to-set-up-facebook-conversion-api/
Apache License 2.0
37 stars 21 forks source link

Pull the city, state and country information directly from the request Headers #45 #40

Closed lucianfialho closed 11 months ago

lucianfialho commented 11 months ago

My proposal is to pull the city, state and country information directly from the request Headers made available by Google App Engine.

This will give the option for those who are unable to pull this information directly from the client side and still capture this data.

For this to work, I added the specific headers:

x-appengine-city x-appengine-country x-appengine-region

Additionally, I added an option (UpdateWithAppEngineGeoDataFromHeaders) within the fields so that the user can select if they want to use Google App Engine Headers.

If the user selects the option, I rewrite the userData object passing the information acquired from the headers

Bukashk0zzz commented 11 months ago

@lucianfialhobp

Thanks for the PR. But I need to reject it.

Meta highly does not recommend this approach.

In their documentation, they mention that you need to pass not the user's current location but the user's home address. The address must be consistent for the same customer. The same user can have a different location in your case. Also, Meta can obtain GEO data from IP by itself.

lucianfialho commented 11 months ago

@lucianfialhobp

Thanks for the PR. But I need to reject it.

Meta highly does not recommend this approach.

In their documentation, they mention that you need to pass not the user's current location but the user's home address. The address must be consistent for the same customer. The same user can have a different location in your case. Also, Meta can obtain GEO data from IP by itself.

No problem :)