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

Site Editor Tracking - Add events for convert/detach template part. #53519

Open
Addison-Stavlo opened this issue Jun 8, 2021 · 1 comment
Open
Labels
[Feature] Stats Everything related to our analytics product at /stats/ [Goal] Full Site Editing

Comments

@Addison-Stavlo
Copy link
Contributor

In the site editor, we need to add tracking events for when a user either:

  • Converts the selected blocks into a Template Part
  • Detaches blocks from their Template Part.

This can be found in the ellipsis menu for a selection of block(s) or a template part:
Screen Shot 2021-06-08 at 3 40 00 PM
Screen Shot 2021-06-08 at 3 40 09 PM

A note (and ❓s ) on existing events that this triggers:

When the 'detach' happens, it currently triggers the wpcom_block_picker_block_inserted event. I believe this event should be suppressed as the block was already on the page as part of the template part and firing the event for the template part dispatch should be enough. Alternative to suppressing the event, we could look at populating the insert_method with a value such as "detach from template part".

When the 'convert' happens, the wpcom_block_picker_block_inserted event also fires for the core/template-part block. Similarly this could also be suppressed given firing a 'convert to template part' event would already convey this information. Similar alternative, we could keep that event and populate the insert_method with something like "convert to template part".

The detach/convert events could also have properties corresponding to which blocks we converted/detached, etc.

Thoughts cc @ianstewart @kurt213 ?

Related to
#53410

@Addison-Stavlo Addison-Stavlo added [Feature] Stats Everything related to our analytics product at /stats/ [Goal] Full Site Editing labels Jun 8, 2021
@kurt213
Copy link

kurt213 commented Jun 18, 2021

When the 'detach' happens, it currently triggers the wpcom_block_picker_block_inserted event. I believe this event should be suppressed as the block was already on the page as part of the template part and firing the event for the template part dispatch should be enough.

When the 'convert' happens, the wpcom_block_picker_block_inserted event also fires for the core/template-part block. Similarly this could also be suppressed given firing a 'convert to template part' event would already convey this information.

Agree on suppressing both of these.

The detach/convert events could also have properties corresponding to which blocks we converted/detached, etc.

This is a great idea. Happy to go with the 'flat list' approach that was suggested on #53592.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Everything related to our analytics product at /stats/ [Goal] Full Site Editing
Projects
None yet
Development

No branches or pull requests

2 participants