Skip to content

Make networkName nullable in ad event data types#3076

Merged
polmiro merged 1 commit into
mainfrom
make-networkname-nullable
Feb 6, 2026
Merged

Make networkName nullable in ad event data types#3076
polmiro merged 1 commit into
mainfrom
make-networkname-nullable

Conversation

@polmiro

@polmiro polmiro commented Feb 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Changed networkName from String to String? in AdLoadedData, AdDisplayedData, AdOpenedData, and AdRevenueData
  • Updated internal AdEvent sealed interface implementations accordingly
  • Regenerated API dump files

Motivation

Ad SDKs like AdMob can return null for network name (e.g., responseInfo?.mediationAdapterClassName). Previously, developers had to use arbitrary fallback values like "Google AdMob" or empty string "", which was misleading in analytics.

Test plan

  • Existing tests pass (already handle nullable networkName for FailedToLoad events)
  • API dump files updated

Allow null for networkName in AdLoadedData, AdDisplayedData, AdOpenedData,
and AdRevenueData. Ad SDKs like AdMob may return null when the network
name is unknown, so developers no longer need to use arbitrary fallbacks.
@polmiro polmiro requested a review from a team as a code owner February 6, 2026 10:19
@polmiro polmiro requested a review from peterporfy February 6, 2026 10:19
@claude

claude Bot commented Feb 6, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@codecov

codecov Bot commented Feb 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.18%. Comparing base (58aaf4a) to head (63b62e3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3076   +/-   ##
=======================================
  Coverage   79.18%   79.18%           
=======================================
  Files         342      342           
  Lines       13680    13680           
  Branches     1841     1841           
=======================================
  Hits        10833    10833           
  Misses       2088     2088           
  Partials      759      759           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero 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!

@polmiro polmiro added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit c574fe7 Feb 6, 2026
26 checks passed
@polmiro polmiro deleted the make-networkname-nullable branch February 6, 2026 11:25
github-merge-queue Bot pushed a commit that referenced this pull request Feb 6, 2026
**This is an automatic release.**

## RevenueCatUI SDK
### Customer Center
#### 🐞 Bugfixes
* CC-628: Refresh Customer Center UI after subscription cancellation
(#3061) via Facundo Menzella (@facumenzella)
### Paywallv2
#### 🐞 Bugfixes
* Improve carousel performance with videos (#3070) via Cesar de la Vega
(@vegaro)

### 🔄 Other Changes
* Make networkName nullable in ad event data types (#3076) via Pol Miro
(@polmiro)
* Remove networkName from AdFailedToLoad event (#3074) via Pol Miro
(@polmiro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
polmiro added a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Feb 6, 2026
…ad events (#1461)

## Summary

- Remove `networkName` from `trackAdFailedToLoad` in both Android and
iOS — when an ad fails to load, multiple networks may have been
involved, so attributing the failure to a single network is not
meaningful
- Make `networkName` nullable/optional in `trackAdDisplayed`,
`trackAdOpened`, `trackAdRevenue`, and `trackAdLoaded` — ad SDKs can
return null for the network name
- Bump iOS SDK `5.57.1` → `5.57.2` and Android SDK `9.20.1` → `9.20.2`

These are breaking changes for the experimental ad tracking API.

**Related PRs:**
- RevenueCat/purchases-android#3074
- RevenueCat/purchases-ios#6208
- RevenueCat/purchases-android#3076
- RevenueCat/purchases-ios#6229
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