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

chore: device attributes update #640

Merged
merged 9 commits into from
Mar 15, 2024
Merged

Conversation

Shahroz16
Copy link
Contributor

@Shahroz16 Shahroz16 commented Mar 14, 2024

closes: https://linear.app/customerio/issue/MBL-168/device-attributes-in-journeys

It does the following:

  • Remove CIO device attributes being sent into context.device (it was unnecessary)
  • if autoTrackDeviceAttributes is false, remove all device attributes from going into properties, context attributes stays unaffected
  • Selected context attributes are now part of device attributes by adding an event plugin
  • Remove library from context as part of https://linear.app/customerio/issue/MBL-173/remove-library-value

Copy link

github-actions bot commented Mar 14, 2024

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.


  • APN-UIKit: shahroz-mbl-168 (1710501018)
  • CocoaPods-FCM: shahroz-mbl-168 (1710501074)

@Shahroz16 Shahroz16 requested a review from a team March 14, 2024 12:07
@@ -40,12 +37,9 @@ class Context: Plugin {
// set the user agent
context["userAgent"] = userAgentUtil.getUserAgentHeaderValue()

// set the device attributes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are not sending CIO device attributes in context, it was providing no value

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 96.87500% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 54.51%. Comparing base (9996872) to head (ad49cbc).
Report is 114 commits behind head on main-replica-for-cdp.

❗ Current head ad49cbc differs from pull request most recent head 06571fc. Consider uploading reports for the commit 06571fc to get more accurate results

Files Patch % Lines
...taPipeline/Plugins/DeviceContexualAttributes.swift 95.65% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           main-replica-for-cdp     #640      +/-   ##
========================================================
- Coverage                 57.35%   54.51%   -2.84%     
========================================================
  Files                       132      139       +7     
  Lines                      3780     3907     +127     
========================================================
- Hits                       2168     2130      -38     
- Misses                     1612     1777     +165     

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

@ami-aman
Copy link
Contributor

Remove CIO device attributes being sent into context.device (it was unnecessary)

@Shahroz16 In tracking migration, we are doing the same i.e. sending the attributes in context.device. I believe this change will affect it too ?

@Shahroz16
Copy link
Contributor Author

Remove CIO device attributes being sent into context.device (it was unnecessary)

@Shahroz16 In tracking migration, we are doing the same i.e. sending the attributes in context.device. I believe this change will affect it too ?

@ami-aman nope, token etc is not a device attribute, its model, OS version etc. Context.device already collects them, we were just adding ours alongside Segments, which was causing duplications.

@ami-aman
Copy link
Contributor

nope, token etc is not a device attribute, its model, OS version etc. Context.device already collects them, we were just adding ours alongside Segments, which was causing duplications.

Hmm..Device attributes does not only contain token it also contain model, OS version etc as collected by our current Journey module. When we do migration, we are sending the data as is to CDP which is kinda duplicate ! Just thinking out loud.

Copy link
Contributor

@mrehan27 mrehan27 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@Shahroz16 Shahroz16 merged commit 1754478 into main-replica-for-cdp Mar 15, 2024
6 of 7 checks passed
@Shahroz16 Shahroz16 deleted the shahroz-mbl-168 branch March 15, 2024 11:50
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.

3 participants