Skip to content

feat(ads): add ad tracking#1780

Open
peterporfy wants to merge 2 commits into
mainfrom
ads-240
Open

feat(ads): add ad tracking#1780
peterporfy wants to merge 2 commits into
mainfrom
ads-240

Conversation

@peterporfy
Copy link
Copy Markdown

@peterporfy peterporfy commented May 26, 2026

Summary

Adds adTracking feature.

Changes

  • PurchasesAdTracker class with 5 methods: trackAdDisplayed, trackAdOpened, trackAdLoaded, trackAdRevenue, trackAdFailedToLoad
  • Purchases.adTracker lazy getter
  • iOS + Android native bridge, browser fallback stubs
  • Types marked @beta: AdMediatorName, AdFormat, AdRevenuePrecision (const namespaces + open string types), 5 data interfaces
  • Unit tests, Jest mocks, apitesters

Open question for reviewer: PurchasesAdTracker lives in purchases.ts alongside Purchases to avoid a circular dep via throwIfNotConfigured. Happy to split if there's a preferred pattern.

Tests

  • added API surface tests
  • manually tested both with android and ios

@peterporfy peterporfy added the pr:feat A new feature label May 26, 2026
@peterporfy peterporfy marked this pull request as ready for review May 26, 2026 16:15
@peterporfy peterporfy requested a review from a team as a code owner May 26, 2026 16:15
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.

1 participant