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

Expand analytics for block insertion/replacement #5976

Merged
merged 11 commits into from
Jul 20, 2023

Conversation

geriux
Copy link
Member

@geriux geriux commented Jul 18, 2023

Related PRs:

This PR improves the analytics we have related to block insertion, it brings some code from Calypso to take into account block replacement and getting the source of where a block was inserted or replaced.

To test:

Precondition:

  • Run the editor using the host apps with metro running.

Inserter

  • Add blocks using the Inserter
  • Check the logs (Xcode/Logcat)
  • Expect to see the event editor_block_inserted with the insert_method property with header-inserter

Quick inserter

  • Add blocks using the quick Inserter (Available when the title is selected or when no block is selected) and the quick blocks buttons in the Header Toolbar.
  • Check the logs (Xcode/Logcat)
  • Expect to see event editor_block_inserted with the insert_method property with quick-inserter

Slash inserter

  • Add blocks using slash inserter.
  • Check the logs (Xcode/Logcat)
  • Expect to see event editor_block_inserted with the insert_method property with slash-inserter

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 18, 2023

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@geriux
Copy link
Member Author

geriux commented Jul 18, 2023

Hey @fluiddot 👋 I have added you as a reviewer for this PR, let me know if you could take a look whenever you can. Thank you!

@fluiddot
Copy link
Contributor

Hey @fluiddot 👋 I have added you as a reviewer for this PR, let me know if you could take a look whenever you can. Thank you!

Sure, I can take a look 👀 .

Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

I checked the events generated and confirmed it's adding the proper inserter source 🎊. However, I noticed that we are generating the editor_block_inserted event in more cases than before (reference).

src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Show resolved Hide resolved
@geriux geriux requested a review from fluiddot July 19, 2023 14:18
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
@geriux geriux requested a review from fluiddot July 20, 2023 07:49
Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 ! I've added some minor comments related to function documentation, but feel free to skip them.

src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
src/analytics/redux/tracked_events.js Outdated Show resolved Hide resolved
@geriux geriux merged commit 3f24cc5 into trunk Jul 20, 2023
@geriux geriux deleted the expand-analytics-for-block-insertion branch July 20, 2023 12:17
@fluiddot fluiddot added this to the 1.100.0 (22.9) milestone Jul 21, 2023
@fluiddot fluiddot mentioned this pull request Jul 21, 2023
4 tasks
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