Interactive tutorials: number steps for analytics

Count the total number of interactive blocks and add this data to the
memo when sending transactions from interactive tutorials. This should
help track the completion rate of tutorials to better measure
effectiveness of the documentation.
This commit is contained in:
mDuo13
2021-09-07 19:35:32 -07:00
parent 5e4e54093e
commit c0ab56ea62
3 changed files with 20 additions and 3 deletions

View File

@@ -451,9 +451,13 @@ function text_to_hex(s) {
* added to them (in-place).
*/
function add_memo(event, tx_json) {
const block = $(event.target).closest(".interactive-block")
const tutorial_info = {
"path": window.location.pathname,
"button": event.target.id
"button": event.target.id,
"step": block.data("stepnumber"),
"totalsteps": block.data("totalsteps")
}
const memo = {