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

Product Creation AI: Add tracking events for v2 #13323

Merged
merged 9 commits into from
Jul 16, 2024
Merged

Conversation

itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jul 15, 2024

Closes: #13304

Description

This PR adds tracking for the updated flow of product creation AI. New events include:

Event name Properties Triggers
*_product_creation_ai_started_package_photo_selection_flow   When the user taps on the “Read text from product photo” button or the “Replace photo” button
*_product_creation_ai_text_detected number_of_texts : Number of texts detected, zero if none detected Finished detecting text from the package photo
*_product_creation_ai_text_detection_failed Error detail properties When text detection fails
*_product_creation_ai_generated_name_description_options names: Total number of name options generated by AIshort_description: Total number of short description options generated by AIdescription: Total number of description options generated by AI Upon successfully generating options of Name, Summary and Description fields.
*_product_creation_ai_undo_edit_tapped field: name | short_description | description When the user taps on the “Undo edits” button

Testing steps

  • Build the app and log in to a store eligible for product creation AI.
  • Navigate to Products tab > tap "+" > Create product with AI.
  • Tap on "Read text from product photo" and confirm that product_creation_ai_started_package_photo_selection_flow is tracked.
  • Select a photo without any text, and confirm that product_creation_ai_text_detection_failed is tracked with ScanError.noTextDetected.
  • Tap on the ellipsis button > Replace photo > confirm that product_creation_ai_text_detection_failed is tracked with ScanError.noTextDetected.
  • Select a valid package photo > confirm that product_creation_ai_text_detected is tracked with the correct number of detected words.
  • Tap Generate product details, confirm that product_creation_ai_generate_details_tapped is tracked with is_first_attempt being true.
  • After the product generation completes, confirm that product_creation_ai_generated_name_description_options is tracked with the correct number of options for name, short description and description.
  • Tap to edit either of those 3 fields and then tap Undo Edits, confirm that product_creation_ai_undo_edit_tapped with the correct field value.
  • Tap Generate again, confirm that product_creation_ai_generate_details_tapped is tracked with is_first_attempt being false.

Screenshots

N/A


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added type: task An internally driven task. feature: add/edit products Related to adding or editing products. category: tracks Related to analytics, including Tracks Events. labels Jul 15, 2024
@itsmeichigo itsmeichigo added this to the 19.6 milestone Jul 15, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Jul 15, 2024

1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jul 15, 2024

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr13323-b393be7
Version19.5
Bundle IDcom.automattic.alpha.woocommerce
Commitb393be7
App Center BuildWooCommerce - Prototype Builds #10002
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review July 15, 2024 07:19
@selanthiraiyan selanthiraiyan self-assigned this Jul 15, 2024
Copy link
Contributor

@selanthiraiyan selanthiraiyan left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, Huong! This works as expected. I left a comment about renaming a property for consistency.

case isFirstAttempt = "is_first_attempt"
case numberOfTexts = "number_of_texts"
case names
Copy link
Contributor

Choose a reason for hiding this comment

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

This is my fault. I wonder whether we should rename this into name for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, updated in b393be7.

@itsmeichigo itsmeichigo merged commit 6308bcf into trunk Jul 16, 2024
19 of 22 checks passed
@itsmeichigo itsmeichigo deleted the task/13304-tracking branch July 16, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tracks Related to analytics, including Tracks Events. feature: add/edit products Related to adding or editing products. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Product Creation AI v2 M1] Add tracking events.
4 participants