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

Ai Assistant: track Write with AI... click events #31082

Merged
merged 5 commits into from
May 31, 2023

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented May 30, 2023

# branched off from #31074

Fixes #31044

Proposed changes:

  • Ai Assistant: track Write with AI... click events

Other information:

  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Yes. This PR records the jetpack_editor_ai_assistant_block_toolbar_button_click event when clicking on the Write with AI... dropdown buttons.

Testing instructions:

  • Go to the block editor
  • Set localStorage debug key to see the tracked events
localStorage.setItem( 'debug', 'dops:analytics*' )
  • Confirm it records the jetpack_editor_ai_assistant_block_toolbar_button_click events when clicking on one of the dropdown's Write with AI... buttons.
  • Confirm it populates the events with type = suggestion and suggestion for the options that suggest changes
Record event "jetpack_editor_ai_assistant_block_toolbar_button_click" called with props {"type":"suggestion","suggestion":"generateTitle","blog_id":215061775}
  • Confirm it populates the events with type = prompt-template and prompt for the predef prompts
Record event "jetpack_editor_ai_assistant_block_toolbar_button_click" called with props {"type":"prompt-template","prompt":"Write a post about ","blog_id":215061775}

@retrofox retrofox added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress [Feature] Tracks [Size] S [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Block] AI Assistant labels May 30, 2023
@retrofox retrofox added this to the Jetpack AI Week 4 milestone May 30, 2023
@retrofox retrofox requested a review from a team May 30, 2023 17:56
@retrofox retrofox self-assigned this May 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run

bin/jetpack-downloader test jetpack update/ai-assistant-track-toolbar-button-events

to get started. More details: p9dueE-5Nn-p2

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

  • Next scheduled release: July 5, 2023.
  • Scheduled code freeze: June 26, 2023.

@retrofox retrofox force-pushed the update/ai-assistant-track-toolbar-button-events branch from 0275a00 to 2a46fb7 Compare May 30, 2023 20:06
Copy link
Contributor

@dhasilva dhasilva left a comment

Choose a reason for hiding this comment

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

Working as intended
2023-05-31_11-14-44

@dhasilva dhasilva added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review labels May 31, 2023
@retrofox retrofox merged commit 2c94d44 into trunk May 31, 2023
@retrofox retrofox deleted the update/ai-assistant-track-toolbar-button-events branch May 31, 2023 14:20
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 31, 2023
kraftbj pushed a commit that referenced this pull request Jun 1, 2023
)

* [not verified] record jetpack_editor_ai_assistant_block_toolbar_button_click event

* [not verified] rename promp name to onPromptSelect

* [not verified] rename prop to onSuggestionSelect

* [not verified] track Write with AI `suggestion`

* changelog
@kraftbj
Copy link
Contributor

kraftbj commented Jun 1, 2023

[monthly/branch-2023-05-29 c98e202]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] AI Assistant [Feature] Tracks [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Size] S [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AI Assistant: Add tracks events to the menu buttons
3 participants