Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: track user resetting flow #2307
feat: track user resetting flow #2307
Changes from 4 commits
d7695bc
178d064
039243a
a8de6b8
ba12362
fa36abe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jessicamcinchak something I hadn't realised is that this
AnalyticsType
is related to theanalytics
model which tracks the overarching analytics session? It stores whether the user's session was aninit
or aresume
?I believe the log direction only applies to
analytics_log
model instances which are tied together with an instance of theanalytics
model?Based on the way the
"reset"
is being recorded against ananalytics_log
if it make more sense to think of it as a log direction i.e. an extreme case of goingbackwards
where you go back to the the start?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure I'm following this one yet, but my instinct here is that "reset" ends the given session and therefore, at least in my mind, it's an analytics type rather than pure "direction" (eg directions like "forwards" and "backwards" are always within a session). But also totally trust your judgement on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a really good point although in this PR the
"reset"
is only ever applied within a session as aflow_direction
As in:
analytics_log
for thatanalytic
session would have aflow_direction
of"reset"
.type
of the aforementionedanalytic
session would remain whatevertype
it had been i.e."init"
or"resume"
analytic
session would default to"init"
So currently the
AnalyticType
is only applied as aflow_direction
.Does that make sense? I'm maybe over focussing on the semantics but I'm just trying to get my head around who things have been working and what we're looking for with this new functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this clarification, this makes a lot more sense now.
I'm thinking:
analytic
sessiontype
captures how the session starts, it's never captured how it "ends" before nowreset
as aflow_direction
onanalytics_log
seems consistent?There's an existing chart in metabase about "Where applicants drop-off" - and if we're considering "reset" as similar to "drop-off" - maybe looking at that underlying SQL query might offter confirmation if this approach will be able to be aggregated/summarised/charted similarly or be difficult without carrying over "reset" as a new
analytic.type
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very helpful framing of the situation, thanks Jess!
I'll have a look at "Where applicants drop-off" and see how it's being approached there and if there are any implications with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a wee look at the SQL query:
The
drop-off
uses theuser_exit
property which to my understanding is marked astrue
when a user stops viewing the page:planx-new/editor.planx.uk/src/pages/FlowEditor/lib/analyticsProvider.tsx
Lines 60 to 86 in a636268
I had thought of a user deciding to
reset
as not actually exiting the page and therefore not being auser_exit: true
.Although in the context of drop off I'm not so sure 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually on second thoughts I think we'll be able to handle the
reset
state in a similar fashion as the query above so we should be okay I think 👍