Skip to content

feat(ads): ad reward tracking support - #1890

Open
peterporfy wants to merge 4 commits into
mainfrom
ads-266
Open

feat(ads): ad reward tracking support#1890
peterporfy wants to merge 4 commits into
mainfrom
ads-266

Conversation

@peterporfy

@peterporfy peterporfy commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This change exposes the ad reward tracking functionality - which is just a new parameter for the polling function.

Do not merge until android and ios sdks are released with the feature.


Note

Medium Risk
Touches rewarded-ad verification and analytics plumbing on native bridges; behavior depends on unreleased iOS/Android SDKs, but the API change is backward compatible.

Overview
Adds optional rewarded-ad tracking when polling reward verification: Purchases.pollRewardVerification now accepts a second argument, trackingMetadata, so the native SDK can automatically emit reward-verification analytics for that ad.

Introduces the beta RewardedAdTrackingMetadata type (mediator, format, ad unit, impression id, optional network/placement) and forwards it through the React Native bridge on iOS and Android, plus the web/browser stub signature. Existing one-argument calls stay valid; apitesters cover the new overload.

Reviewed by Cursor Bugbot for commit 4308157. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@peterporfy
peterporfy marked this pull request as ready for review August 14, 2026 08:19
@peterporfy
peterporfy requested a review from a team as a code owner August 14, 2026 08:19
@peterporfy peterporfy added the pr:feat A new feature label Aug 14, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9991b36. Configure here.

Comment thread ios/RNPurchases.m Outdated

@AlvaroBrey AlvaroBrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good, just one question

Comment thread src/browser/nativeModule.ts Outdated
methodNotSupportedOnWeb('generateRewardVerificationToken');
},
pollRewardVerification: async (_clientTransactionId: string) => {
pollRewardVerification: async (_clientTransactionId: string, _trackingMetadata?: any) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

q: why any, if there's a RewardedAdTrackingMetadata definition below (whose doc says it's for this fun)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no reason for this to be any. Changed it: b4647de

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

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants