We have an anonymous tracking system on the Block Editor on Dotcom (see PCYsg-nrf-p2).
Currently, the implementation of this system (necessarily) relies on a few unstable APIs including:
This makes the tracking susceptible to subtle breakages leading to data loss for our status.
For example, recently tracking of "no results" in the block inserter/picker was broken because of a regression in a Gutenberg which caused some DOM elements to go missing. This was only picked up by chance as there was no warning that things were broken.
We need to
I propose the following solutions:
paYJgx-CC-p2#comment-818 for more on this.Whilst this may require a lot of work, the alternative is that our tracking events will continue to fail silently. This will cost us data loss and broken statistics. Given how important some of these stats are for making decisions on priorities, it feels like a sound investment of time.
cc @davemart-in
I'd say let's start with item 1 (e2e testing) and see if that remedies things. We can then layer on item 2 later on if it becomes necessary. Sound good?
Here is some existing prior art which runs e2e tests against the Block Editor in Calypso env.
We should be able to add another spec which asserts against all our user actions and ensures events are fired accordingly.
Also https://github.com/Automattic/wp-calypso/pull/41174 helps test against latest Gutenberg.
This is being worked on in https://github.com/Automattic/wp-calypso/pull/41329
@obenland Is there any scope for pulling this into one of our upcoming Iterations? Bear in mind that we already have a PR which is at least 50% complete.
Yes, putting it in 116 will give DM a chance to prioritize it
See paYJgx-Es-p2#comment-1213.