Commit 10e28c6
Write: add anon funnel Tracks events + is_anon on editor open (#50216)
* Write: add anon funnel Tracks events + is_anon on editor open
Instruments the two intent steps of the Write On Phase 1 fake-door funnel
that were missing between "land" and "signup":
* wpcom_write_editor_anon_write_start — fires once per session on the first
real keystroke in the anon editor (guards against empty-editor abandons
counting as writes).
* wpcom_write_editor_anon_publish_click — fires when an anon visitor hits the
signup wall at Publish, with word_count, time_to_publish_ms, draft_size_bytes.
Both go through the _tkq queue and share the tk_ai cookie, so they stitch to
the new user at signup completion (identifyUser via the write-on flow's
builtin-auth registration path).
Also adds is_anon to the server-side wpcom_write_editor_open event
((int) ! is_user_logged_in() — anon is the only logged-out render of this
editor), so the funnel can scope its top-of-funnel denominator to anon traffic
without depending on the client-only wpcomWriteIsAnon flag.
READ-560
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bej2wXzZnmKgdR6v5UHc5J
* Write: also register anon write-start on title input
The title field binds to updateTitle, not repairStructure, so a visitor who
typed only a title would emit anon_publish_click without a preceding
anon_write_start. Hook the title action too, so a title-only author still
registers a write-start.
READ-560
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bej2wXzZnmKgdR6v5UHc5J
* Write: flush anon publish_click Tracks pixel before the signup redirect
wpcom Tracks sends beacons via new Image(), whose in-flight GET the
browser cancels on unload. wpcom_write_editor_anon_publish_click fires
immediately before window.location.assign() to the signup flow, so a
synchronous redirect could drop the funnel's key conversion event.
Route it through a bounded flush helper that gives the pixel time to
dispatch, then navigate. The wait only applies when the Tracks client
has upgraded the _tkq queue; otherwise it resolves immediately so the
handoff is never stalled for a beacon that won't fire.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHatptuGFWEvGfGzPDUjfT
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/28818337048
Upstream-Ref: Automattic/jetpack@28b9f521 parent 41c9822 commit 10e28c6
5 files changed
Lines changed: 158 additions & 38 deletions
File tree
- jetpack_vendor
- automattic/jetpack-mu-wpcom
- src/features/write
- vendor/composer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
Lines changed: 114 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
40 | 119 | | |
41 | 120 | | |
42 | 121 | | |
| |||
3458 | 3537 | | |
3459 | 3538 | | |
3460 | 3539 | | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
3461 | 3547 | | |
3462 | 3548 | | |
3463 | 3549 | | |
| |||
3673 | 3759 | | |
3674 | 3760 | | |
3675 | 3761 | | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
3676 | 3768 | | |
3677 | 3769 | | |
3678 | 3770 | | |
| |||
5782 | 5874 | | |
5783 | 5875 | | |
5784 | 5876 | | |
| 5877 | + | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
| 5882 | + | |
| 5883 | + | |
| 5884 | + | |
| 5885 | + | |
| 5886 | + | |
5785 | 5887 | | |
5786 | 5888 | | |
5787 | 5889 | | |
| |||
5791 | 5893 | | |
5792 | 5894 | | |
5793 | 5895 | | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
| 5899 | + | |
| 5900 | + | |
| 5901 | + | |
| 5902 | + | |
| 5903 | + | |
| 5904 | + | |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
5794 | 5908 | | |
5795 | 5909 | | |
5796 | 5910 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments