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

[STRATCONN-4101 & STRATCONN - 4099] Update Amazon Ads normalisation #2661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Innovative-GauravKochar
Copy link
Contributor

@Innovative-GauravKochar Innovative-GauravKochar commented Dec 20, 2024

This PR updates the normalisation and hashing methods to align with the amazon ads data format requirements. https://advertising.amazon.com/help/GCCXMZYCK4RXWS6C

Jira Tickets:
Email normalisation
Phone Normalisation

Tested it locally and Staging.

Testing

Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.41%. Comparing base (1225556) to head (d48ec5c).

Files with missing lines Patch % Lines
...estinations/amazon-amc/syncAudiencesToDSP/index.ts 93.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2661      +/-   ##
==========================================
+ Coverage   78.40%   78.41%   +0.01%     
==========================================
  Files        1032     1032              
  Lines       18564    18574      +10     
  Branches     3517     3519       +2     
==========================================
+ Hits        14555    14565      +10     
+ Misses       2833     2832       -1     
- Partials     1176     1177       +1     

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

Copy link
Contributor

@varadarajan-tw varadarajan-tw left a comment

Choose a reason for hiding this comment

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

LGTM. Left a question.

// Define allowed character patterns
const alphanumeric = /[^a-z0-9]/g
const emailAllowed = /[^a-z0-9.@-]/g
const nonDigits = /[^\d]/g
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this strip all leading zeros? Is that a requirement? Just checking as it is called out in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No @varadarajan-tw it does not .As per this amazon format hashing ,They have specified removing leading or trailing whitespaces ,not zeroes. But yes it is mentioned in ticket.

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