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

Tracks for JITM displayed #7657

Merged

Conversation

AnirudhBhat
Copy link
Contributor

@AnirudhBhat AnirudhBhat commented Oct 27, 2022

Closes: #7625

Description

This PR has analytics to track when the JITM is displayed on the screen. Please note that this tracks only JITM display and not the JITM fetch success. There might be a chance that the JITM API succeeds but the JITM list will be empty and hence, not displayed.

*_jitm_displayed

Properties:
source : my_store
jitm_id : {jitm_id}
jitm_group : {FEATURE_CLASS}

More info: pdfdoF-1zc-p2

Testing instructions

Pre-requisite

As mentioned in this post (pdfdoF-1vt-p2) make sure you have installed any one of the mentioned barcode plugin installed on your store. For example - you can install A4 Barcode Generator

Your store must be set up in the US. JITM is not supported in any other country.

  1. Open the WooCommerce android app and you should see My Store tab by default as the first screen
  2. Make sure you see JITM related to the IPP.
  3. Check in the logs that JITM display event is tracked
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

…ta-tapped-track

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModel.kt
…dismiss-tapped-track

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModel.kt
…itm-dismiss-success-track

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModel.kt
#	WooCommerce/src/test/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModelTest.kt
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 27, 2022

You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:

@AnirudhBhat AnirudhBhat added feature: mobile payments Related to mobile payments / card present payments / Woo Payments. feature: analytics In-app store analytics labels Oct 27, 2022
@AnirudhBhat AnirudhBhat added this to the 11.0 milestone Oct 27, 2022
@peril-woocommerce
Copy link

peril-woocommerce bot commented Oct 27, 2022

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone
Messages
📖

This PR contains changes to Tracks-related logic. Please ensure the following are completed:
PR Author

  • The PR must be assigned the Tracks label
    PR Reviewer
  • The tracks events must be validated in the Tracks system.
  • Verify the internal tracks spreadsheet has also been updated.

Generated by 🚫 dangerJS

@AnirudhBhat AnirudhBhat marked this pull request as ready for review October 27, 2022 13:03
Copy link
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks @AnirudhBhat! LGTM, I've left one minor comment.

@@ -237,6 +237,10 @@ class AnalyticsTracker private constructor(private val context: Context) {
const val KEY_HAS_MULTIPLE_SHIPPING_LINES = "has_multiple_shipping_lines"
const val KEY_HAS_MULTIPLE_FEE_LINES = "has_multiple_fee_lines"

const val JITM_ID = "jitm_id"
const val JITMS = "jitms"
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ This doesn't seem to be used. Is it necessary?

@malinajirka malinajirka self-assigned this Oct 27, 2022
Copy link
Contributor

@pachlava pachlava left a comment

Choose a reason for hiding this comment

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

@AnirudhBhat 👋

Even though the Instrumented Tests fail because of the missing WireMock request matcher, I believe this will be solved after the current branch eventually ends in issue/7559-jitm-api branch, to which I took the liberty of adding (20bb09e) the missing WireMock file.

As per the jitm_displayed event, I confirm that it's indeed tracked:

Screenshot 2022-10-28 at 00 39 25

:shipit:

…tm-displayed-track

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModel.kt
…ta-tapped-track

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/mystore/MyStoreViewModel.kt
…cess-track

Tracks for JITM dismiss success
…ped-track

Tracks for JITM dismiss tapped
@AnirudhBhat AnirudhBhat merged commit a2b4008 into issue/7622-jitm-fetch-failure-track Oct 28, 2022
@AnirudhBhat AnirudhBhat deleted the issue/7625-jitm-displayed-track branch October 28, 2022 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: analytics In-app store analytics feature: mobile payments Related to mobile payments / card present payments / Woo Payments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants