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

Add section for user data field formatting #4734

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

bobbyatsegment
Copy link
Contributor

Proposed changes

Facebook CAPI (Actions) docs do not currently provide insight into what formatting the integration performs to user data values prior to hashing them. Added this information as a section under FAQ.

Merge timing

Related issues (optional)

@bobbyatsegment bobbyatsegment marked this pull request as ready for review May 30, 2023 23:07
@bobbyatsegment bobbyatsegment requested a review from a team as a code owner May 30, 2023 23:07
@bobbyatsegment bobbyatsegment requested review from forstisabella and removed request for a team May 30, 2023 23:07

| User Data Field | Formatting applied to field value before hashing |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| External ID, Email, Gender, Last Name, First Name, City, State, Zip Code, Country | All whitespace is removed from string, set to lowercase. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these "stack"? I see the State field in this row, which gets converted to lowercase here, and then in line 162 it looks like it's compared against a map object of states and their two-character ANSI code.

Would it be formatted like this:
Texas > texas > tx?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbyatsegment - do these data parameter formatting rules "stack"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly right! first the state is lowercased, then replaced with the corresponding value in the map


| User Data Field | Formatting applied to field value before hashing |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| External ID, Email, Gender, Last Name, First Name, City, State, Zip Code, Country | All whitespace is removed from string, set to lowercase. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend making each of these user data fields in this line their own line in the table. If these do "stack" (Texas > texas > tx) you could combine the two transformations in one line. For example:

"All whitespace is removed from string and the result is compared against a map object of states and their two-character ANSI abbreviation code. Example: "Texas", "TX", or "tx" in this field will be formatted as "tx"."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this, thank you! Just updated with this - separated each user data field in their own line, and used the wording you recommended here for both state and country fields

@forstisabella
Copy link
Contributor

Hi @bobbyatsegment - left a few comments on this PR, if you have a minute to address them!

@forstisabella
Copy link
Contributor

sweet, this looks great: I'll go ahead and merge it! @bobbyatsegment

@forstisabella forstisabella merged commit c4eeb31 into develop Aug 9, 2023
@forstisabella forstisabella deleted the bobbyatsegment-patch-2 branch August 9, 2023 20:53
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

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

Successfully merging this pull request may close these issues.

2 participants