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 #190

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

mrehan27
Copy link
Contributor

@mrehan27 mrehan27 commented Jan 1, 2025

closes: MBL-758

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.1 to support new ScreenView configuration option
  • Modified native code files to pass screenViewUse configuration to native SDKs for appropriate handling
  • Updated relevant tests in SDK
  • Updated sample app to allow screenViewUse configuration to be modified from the settings page for testing purposes
  • Added minor updates and fixes to sample app code

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

CustomerIO.initialize(
  config: CustomerIOConfig(
    ...
    screenViewUse: ScreenView.inApp,
  ),
);

Screenshot (Sample App)

Screenshot_20250102_004724

@mrehan27 mrehan27 self-assigned this Jan 1, 2025
Copy link

github-actions bot commented Jan 1, 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.


  • amiapp_flutter: 190.2.0 (28935922)

@@ -1,7 +1,7 @@
# -------------
# This code only used internally for Customer.io testing
require 'open-uri'
IO.copy_stream(URI.open('https://raw.githubusercontent.com/customerio/customerio-ios/v2/scripts/cocoapods_override_sdk.rb'), "/tmp/override_cio_sdk.rb")
IO.copy_stream(URI.open('https://raw.githubusercontent.com/customerio/customerio-ios/main/scripts/cocoapods_override_sdk.rb'), "/tmp/override_cio_sdk.rb")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated so we can use data pipeline release

inAppConfig: InAppConfig(
siteId: prefs.getString(_PreferencesKey.migrationSiteId) ?? ""),
);
}

Map<String, dynamic> toMap() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't see it being used anywhere so removed it

@mrehan27 mrehan27 requested a review from a team January 1, 2025 19:51
Copy link
Collaborator

@Shahroz16 Shahroz16 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@Shahroz16 Shahroz16 left a comment

Choose a reason for hiding this comment

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

i do think we have updated iOS versions too. Can you update that as well?

@mrehan27
Copy link
Contributor Author

mrehan27 commented Jan 3, 2025

iOS SDK version is already updated to current latest, but we plan to roll out another fix on iOS early next week. We'll hold off on merging this PR until the fix is released and update iOS version to latest again after iOS release.

@mrehan27 mrehan27 merged commit b4a4fed into main Jan 6, 2025
7 checks passed
@mrehan27 mrehan27 deleted the rehan/mbl-758-screenview-config branch January 6, 2025 20:13
github-actions bot pushed a commit that referenced this pull request Jan 6, 2025
## [2.1.0](2.0.0...2.1.0) (2025-01-06)

### Features

* add option to disable screen view usage ([#190](#190)) ([b4a4fed](b4a4fed))
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