facebookincubator / ConversionsAPI-Tag-for-GoogleTagManager

This repository will contain the artifacts needed for setting up Conversions API implementation on Google Tag Manager's serverside. Please follow the instructions https://www.facebook.com/business/help/702509907046774
Apache License 2.0
64 stars 29 forks source link

Strip port from IP address #36

Open kainula opened 2 years ago

kainula commented 2 years ago

Facebook conversions API does not accept IP addresses with port number. Parameter ip_override, which is used as a user IP address, can have a port.

Modify the ip_override so that the port is removed.

SebbeJohansson commented 1 year ago

I have the same question for Meta. I am trying to talk to them about this, but currently the only solution is to make our own version of the template.

Bukashk0zzz commented 1 year ago

@SebbeJohansson @kainula Why do you not use the Stape version of the template? It supports all functionality that the official tag has and adds on top of its additional features.

We maintain our templates and fix any issues fast.

SebbeJohansson commented 1 year ago

@Bukashk0zzz Hi! I am in discussion with Meta about the stape template (haven't been in contact with anyone from stape so haven't been able to go directly there). The stape io template has a much worse performance compared to the official Meta one. Several features in the stape io template is useless for us, but that cause worse performance (like pinging back to the session to create a cookie). We had an issue with collect events both to GA4 and FB timing out, which turned out to be because the stape io template didn't process fast enough.

Currently our solution for our issues (both this and sending email and phone number with our ga4 mapping of data) was to modify the official template. It could be that we are missing something with how to use the Stape template. Not sure!

Maybe, this is because of the amount of data we are processing. Not sure!

If you or anyone else from Stape want to talk to me about this, feel free to reach out to my email at sebastian.johansson@revolutionrace.se

Bukashk0zzz commented 1 year ago

@SebbeJohansson You were the first one who mentioned performance issues inside our template. That's a pretty interesting case. We have customers with different amounts of traffic and never had such an issue. The official template works with cookies in the same way as Stape because there are no other methods to do this inside sGTM.

I believe that code of the Stape template is processing a little bit longer than the Official one, but this is like 2 ms with 3 ms. Almost all the time, tags wait for responses from the platform.

The Stape template uses a new CAPI version. Maybe that's why you have a longer response time. Or maybe you need more sGTM server instances to handle your traffic.

SebbeJohansson commented 1 year ago

@Bukashk0zzz interesting! The official one doesn't send any call back to the client at all for us. Maybe I'm checking wrong.

We went from having requests missing from timing out to everything working fine. Weird that no one else is reporting issues.

We are at the same number of servers so it's not that. Is there someone that I can email to talk about this directly with stape? The stape one has features that we need (remapping user data among others) so I had to modify (aka borrow code from your one) to add into the official Meta one. We would love to use the stape one instead, but currently it's not an option.

koconnor3 commented 1 year ago

re: "The official one doesn't send any call back to the client at all for us" - that's because Meta hasn't actually published any of the updates they've been making in this repo for a while... the latest code in this repo sets the cookie, but they haven't published the latest version (or two) to the template gallery. The template in the gallery has been stuck for months. — Kevin O'Connor, Digital Marketing Analyst www.iDimension.com http://www.idimension.com/?utm_id=VwkC +1 (866) 524.3733

On Fri, Mar 3, 2023 at 6:30 AM Sebastian Johansson @.***> wrote:

@Bukashk0zzz https://github.com/Bukashk0zzz interesting! The official one doesn't send any call back to the client at all for us. Maybe I'm checking wrong.

We went from having requests missing from timing out to everything working fine. Weird that no one else is reporting issues.

We are at the same number of servers so it's not that. Is there someone that I can email to talk about this directly with stape? The stape one has features that we need (remapping user data among others) so I had to modify (aka borrow code from your one) to add into the official Meta one. We would love to use the stape one instead, but currently it's not an option.

— Reply to this email directly, view it on GitHub https://github.com/facebookincubator/ConversionsAPI-Tag-for-GoogleTagManager/issues/36#issuecomment-1453389984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3LD7G3KPD3JHRJ4NHEHTLW2HI6RANCNFSM5ZPBDU4Q . You are receiving this because you are subscribed to this thread.Message ID: <facebookincubator/ConversionsAPI-Tag-for-GoogleTagManager/issues/36/1453389984 @github.com>

SebbeJohansson commented 1 year ago

@koconnor3 so the only reason the official one doesn't completely crash our sgtm servers are because its not up to date with the repo. That is kinda hilarous.

koconnor3 commented 1 year ago

Still not sure I follow why setting an HTTP cookie from the template would crash your servers (and I've used both without performance issues), but yeah, the only reason the official one doesn't do the same thing as Stape's (in regards to this feature) is that Meta isn't good at publishing updates to the gallery. — Kevin O'Connor, Digital Marketing Analyst www.iDimension.com http://www.idimension.com/?utm_id=VwkC +1 (866) 524.3733

On Fri, Mar 3, 2023 at 9:43 AM Sebastian Johansson @.***> wrote:

@koconnor3 https://github.com/koconnor3 so the only reason the official one doesn't completely crash our sgtm servers are because its not up to date with the repo. That is kinda hilarous.

— Reply to this email directly, view it on GitHub https://github.com/facebookincubator/ConversionsAPI-Tag-for-GoogleTagManager/issues/36#issuecomment-1453634514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3LD7GOTY67F3GN2BJDQBLW2H7SPANCNFSM5ZPBDU4Q . You are receiving this because you were mentioned.Message ID: <facebookincubator/ConversionsAPI-Tag-for-GoogleTagManager/issues/36/1453634514 @github.com>

SebbeJohansson commented 1 year ago

@koconnor3 the call going from sgtm back to the client was timing out and in turn, the collection events going both to FB and ga4 was timing out. I dont know why (still waiting for Google to finish their internal investigation), but it was happening. Switching to the official one (with some modding from me) worked.

I did see that StapeIO has an "offline" template (not sure what the difference is) but didn't look like it was doing the problematic stuff.

Bukashk0zzz commented 1 year ago

If this is still actual @SebbeJohansson can you submit a request here with a detailed description https://help.stape.io/hc/en-us ? Please refer to this issue and please mention that Denis asked you to create this ticket. We at Stape will try to reproduce it.

Bukashk0zzz commented 1 year ago

If this is still actual @SebbeJohansson can you submit a request here with a detailed description https://help.stape.io/hc/en-us ? Please refer to this issue and please mention that Denis asked you to create this ticket. We at Stape will try to reproduce it.

SebbeJohansson commented 1 year ago

Hi @Bukashk0zzz. It is still present. I'll submit a ticket!