Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per Google, GCLID, GBRAID and WBRAID can't be used at the same time. #2365

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

seg-leonelsanches
Copy link
Contributor

Per Google:

"Considering that for iOS, gclid is sent if your user has given consent on iOS, and gbraid if the user has not given consent, it makes no sense to send Advanced Conversions email data requesting consent if gbraid is sent at the same time which implies no consent."

Our integration allows a customer to send all the three parameters together, resulting in cryptic errors in the destination.

Testing

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [Segmenters] Tested in the staging environment

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.95%. Comparing base (5a5f52b) to head (d7989dd).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2365       +/-   ##
===========================================
+ Coverage   33.18%   77.95%   +44.76%     
===========================================
  Files          14      982      +968     
  Lines         693    17034    +16341     
  Branches      109     3196     +3087     
===========================================
+ Hits          230    13279    +13049     
- Misses        463     2687     +2224     
- Partials        0     1068     +1068     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…conversions/uploadClickConversion/index.ts

Co-authored-by: Joe Ayoub <[email protected]>
@joe-ayoub-segment
Copy link
Contributor

hi @brennan - got a small PR for a change to 2 Actions in Google Enhanced Conversions, raised by @seg-leonelsanches from the SA team.

Could you triage please?

@brennan
Copy link
Contributor

brennan commented Oct 4, 2024

Hi @seg-leonelsanches, thanks for raising this PR. Please provide:

  • A link to Google's documentation supporting the change.
  • A link to Google's documentation related to the errors customers are seeing (including screenshots of the errors).
  • A description of all possible side effects on existing customers (as this change will result in Segment discarding customer events that we previous sent to Google's API).

@lukebussey
Copy link

@brennan This has been problematic when using the Google Ads destination.

You can only send one of gclid, gbraid, or wbraid. But Google will append one or more on the ad final URL.

https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#set_the_required_fields_of_each_conversion_operation

Google's code example shows the following logic:

# Sets the single specified ID field.
    if gclid:
        click_conversion.gclid = gclid
    elif gbraid:
        click_conversion.gbraid = gbraid
    else:
        click_conversion.wbraid = wbraid

This is the error you get from the mapping event tester:

Screenshot 2024-10-05 at 12 25 14 PM

There's no impact in adding this change, customers events are already failing if more than one parameter is being sent.

In addition, this PR doesn't address another issue where if a gbraid or wbraid parameter are sent, Google will reject the payload if it contains an email address and/or phone number.

Error messages:
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#debug_common_errors

Error Message
ConversionUploadError.GBRAID_WBRAID_BOTH_SET The ClickConversion has a value set for both gbraid and wbraid. Update the conversion to use only one click ID, and make sure you are not combining multiple clicks into the same conversion. Each click has only one click ID.
FieldError.VALUE_MUST_BE_UNSET Check the location of the GoogleAdsError to determine which of the following issues led to the error.

The ClickConversion has a value set for gclid as well as at least one of gbraid or wbraid. Update the conversion to use only one click ID, and make sure you are not combining multiple clicks into the same conversion. Each click has only one click ID.

The ClickConversion has a value set for either gbraid or wbraid and has a value for custom_variables. Google Ads does not support custom variables for a conversion with a gbraid or wbraid click ID. Unset the custom_variables field of the conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants