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

feat: add option to disable screen view usage #369

Merged
merged 6 commits into from
Jan 6, 2025

Conversation

Shahroz16
Copy link
Contributor

@Shahroz16 Shahroz16 commented Jan 3, 2025

closes: https://linear.app/customerio/issue/MBL-757/add-config-to-react-native

Changes

  • Added screenViewUse config to disable sending screen view events to server, allowing local usage only
  • Updated Android SDK to version 4.5.0 and iOS SDK to version 3.7.0 to support new ScreenView configuration option
  • Modified native code files to pass screenViewUse configuration to native SDKs for appropriate handling
  • Updated sample app to allow screenViewUse configuration to be modified from the settings page for testing purposes

ScreenView Options

  • Analytics -> Sends all screen events to the server (same as before) - Default behavior
  • InApp -> Retains screen events locally for in-app use only

Sample Usage

export const initializeCustomerIoSDK = (sdkConfig) => {
  let screenViewUse = stringToScreenView(sdkConfig.screenViewUse);
  const config = {
    cdpApiKey: sdkConfig.cdpApiKey, // Mandatory
    screenViewUse: screenViewUse,
  };
  CustomerIO.initialize(config);
};

Sample app

Simulator Screenshot - iPhone 16 Pro - 2025-01-03 at 18 21 45

Copy link

github-actions bot commented Jan 3, 2025

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • FCM: 369.6.0 (28936364)
  • APN: 369.6.0 (28936364)

@Shahroz16 Shahroz16 requested a review from a team January 3, 2025 13:24
@Shahroz16 Shahroz16 merged commit 055835e into main Jan 6, 2025
9 checks passed
@Shahroz16 Shahroz16 deleted the mbl-757-screen-use-filter branch January 6, 2025 17:19
github-actions bot pushed a commit that referenced this pull request Jan 6, 2025
## [4.2.0](4.1.1...4.2.0) (2025-01-06)

### Features

* add option to disable screen view usage ([#369](#369)) ([055835e](055835e))
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.

2 participants