Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add opt-in usage tracking for blocks added to post content #2140
This PR asks users for permission to enable usage tracking:
When the user clicks "Yes" or "No", the preference is stored using the existing WordPress method of saving user preferences (the
If the user clicks "Yes", tracking events will be recorded using existing WP.com infrastructure every time a block is added to the editor. The approach taken here is very similar to Calypso's event tracking code.
We can use the data added in this PR to inform various decisions such as default order for blocks and whether some blocks are less suitable for core, and more generally this is a very useful technique to collect user experience data.
@@ Coverage Diff @@ ## master #2140 +/- ## ========================================== + Coverage 22.3% 22.98% +0.68% ========================================== Files 137 141 +4 Lines 4291 4415 +124 Branches 722 743 +21 ========================================== + Hits 957 1015 +58 - Misses 2815 2874 +59 - Partials 519 526 +7
To test this PR, you can use the following commands in the browser console: