8000 [🛁] Adding new tracking session properties by eoji · Pull Request #702 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[🛁] Adding new tracking session properties #702

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

Merged
merged 6 commits into from
Jan 7, 2020
Merged

Conversation

eoji
Copy link
Contributor
@eoji eoji commented Jan 6, 2020

📲 What

Adding "Session Properties" tracking group.

🤔 Why

The first step of many for new tracking events.

🛠 How

  • Added abExperiments property to Config model
  • Added ConfigUtils.currentVariants to return a JSONArray of current experiments
  • Added new session properties to TrackingClientType
  • Implemented new session property values in TrackingClient
  • Testzzzzz

👀 See

Nothing 2 c here

📋 QA

All events sent to the Lake 💧 should have these properties. This is a WIP so I'm on hitting staging.

Story 📖

Part of [NT-654]

Added ConfigUtils.currentVariants to return a JSONArray of current experiments.
Added new session properties to TrackingClientType.
Implemented new session property values in TrackingClient.
Testzzzzz
@eoji eoji requested a review from ifbarrera January 6, 2020 22:23
Copy link
@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

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

Lgtm! Just a couple minor suggestions.

private @NonNull Map<String, Object> sessionProperties(final boolean userIsLoggedIn) {
final Map<String, Object> properties = new HashMap<String, Object>() {
{
put("android_uuid", androidUUID());

Choose a reason for hiding this comment

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

On iOS we used to have ios_uuid but removed it since it's just the same value as device_distinct_id. You might be able to remove this prop as well.

@@ -44,12 +44,32 @@ class LakeTest : KSRobolectricTestCase() {

private fun assertDefaultProperties(user: User?) {

Choose a reason for hiding this comment

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

Should we consider renaming these tests to assertSessionProperties so that it's consistent with the sessionProperties function name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so these will include all properties including the session, context, and user groups so i don't think default is right but not sure session is true either. maybe just assertProperties?

Choose a reason for hiding this comment

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

Ahh gotcha. I think maybe default makes sense then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so i renamed this method but left the test methods as assertDefaultProperties!

Removed android_uuid property and renamed method to deviceDistinctId
@eoji eoji merged commit d32fc51 into master Jan 7, 2020
@eoji eoji deleted the session-properties branch January 7, 2020 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0