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

Add tracks event for the "add new post" button post-publish #55419

Merged
merged 1 commit into from
Aug 15, 2021

Conversation

p-jackson
Copy link
Member

@p-jackson p-jackson commented Aug 12, 2021

Changes proposed in this Pull Request

  • Adds tracking to the "Add new post/page" button

Screen Shot 2021-08-12 at 11 16 43 am

This button was added in WordPress/gutenberg#33276 and we want to know how much it gets used.

p1628731010423300-slack-C029SB8JT8S

Read more about testing tracks events in the block editor: PCYsg-nrf-p2

Testing instructions

  • Sandbox widgets.wp.com
  • Run in your sandbox: install-plugin.sh wpcom-block-editor add/tracks-new-post-button-after-publish
  • Open network tools and filter by wpcom_block_editor_post_publish_add_new_click
  • Ensure the network tools are persisting logs (part of testing involves a page transition, so we don't want the event to disappear before we can verify it)
  • Publish a post/page
  • Check that the wpcom_block_editor_post_publish_add_new_click event was sent and that the post_type property is set to either 'post' or 'page'

Because this tracking depends on a CSS selector I'll add e2e test to we're notified if the selector breaks. I'll add the test in a follow up PR because the tests will just fail until this change has merged (tests are run against the production version of widgets.wp.com) #55483

@p-jackson p-jackson self-assigned this Aug 12, 2021
@github-actions
Copy link

github-actions bot commented Aug 12, 2021

@p-jackson p-jackson added [Feature] Tracks Metrics & Monitoring Capturing analytics about user behavior on WordPress.com. Blogger Experience Pod labels Aug 12, 2021
@matticbot
Copy link
Contributor

This PR modifies the release build for wpcom-block-editor

To test your changes on WordPress.com, run install-plugin.sh wpcom-block-editor add/tracks-new-post-button-after-publish on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-l4k-p2

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@p-jackson p-jackson force-pushed the add/tracks-new-post-button-after-publish branch from 002d6de to 20b18b2 Compare August 13, 2021 00:49
@p-jackson p-jackson marked this pull request as ready for review August 13, 2021 02:44
@p-jackson p-jackson requested a review from a team August 13, 2021 02:45
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 13, 2021
Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@p-jackson p-jackson merged commit 77faf6a into trunk Aug 15, 2021
@p-jackson p-jackson deleted the add/tracks-new-post-button-after-publish branch August 15, 2021 22:38
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blogger Experience Pod [Feature] Tracks Metrics & Monitoring Capturing analytics about user behavior on WordPress.com.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants