Skip to content

[STRATCONN-5687] Added support for bing ads consent mode #822

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

Merged
merged 13 commits into from
Apr 30, 2025

Conversation

AnkitSegment
Copy link
Contributor

@AnkitSegment AnkitSegment commented Apr 29, 2025

What does this PR do?

In this PR added support for bing ads consent mode changes.

JIRA TICKETS: https://twilio-engineering.atlassian.net/browse/STRATCONN-5687

Are there breaking changes in this PR?
NO

Testing
Testing completed successfully

When Default is granted

Screenshot 2025-04-30 at 12 29 08 AM

When default is denied and Manual value mapped when CMP is not used

Screenshot 2025-04-30 at 12 55 34 AM

when default is denied and is a CMP user.

Screenshot 2025-04-30 at 12 32 02 AM

Any background context you want to provide?

Is there parity with the server-side/android/iOS integration components (if applicable)?

Does this require a new integration setting? If so, please explain how the new setting works

Links to helpful docs and other external resources

@AnkitSegment AnkitSegment requested a review from Copilot April 29, 2025 20:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Bing Ads consent mode by updating the configuration for webpack builds and implementing consent handling in the Bing Ads integration.

  • Updates webpack configuration files to use SHA-256 for hashing.
  • Implements consent initialization and dynamic consent updates in the Bing Ads integration.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
webpack.config.tester.js Adds hashFunction with SHA-256 to the output configuration.
webpack.config.middleware.js Adds hashFunction with SHA-256 to the middleware build configuration.
webpack.config.integrations.js Adds hashFunction with SHA-256 to the integrations build configuration.
integrations/bing-ads/lib/index.js Implements Bing Ads consent mode logic in both initialize and track methods.
Files not reviewed (1)
  • integrations/bing-ads/package.json: Language not supported

Comment on lines +34 to +36
var consent = {
ad_storage: self.options.adStorage || 'denied'
};
Copy link
Preview

Copilot AI Apr 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The consent object creation logic appears in both the initialize and track methods; consider refactoring this repeated logic into a helper function to improve maintainability.

Suggested change
var consent = {
ad_storage: self.options.adStorage || 'denied'
};
var consent = self.createConsentObject({ adStorage: self.options.adStorage });

Copilot uses AI. Check for mistakes.

@AnkitSegment AnkitSegment merged commit 8ab0178 into master Apr 30, 2025
5 of 6 checks passed
@AnkitSegment AnkitSegment deleted the bing-ads-consent branch April 30, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants