Skip to content
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 a user navigating backwards through flow by node id #2357

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

Mike-Heneghan
Copy link
Contributor

@Mike-Heneghan Mike-Heneghan commented Nov 1, 2023

What

  • Users can initiate moving backwards through the flow by node id via the back or change button.
  • Track users initiating this and store the initiator i.e back or change and store target node metadata i.e. title and type.

Why

  • Currently we can't clearly infer when a user initiated moving backwards through a flow via the back or change button.
  • Added some basic data of the target node being navigated back to gain insight on which question are challenging and which are often changed

Screen Recording

Screen.Recording.2023-11-02.at.12.54.42.mov

@Mike-Heneghan Mike-Heneghan self-assigned this Nov 1, 2023
@Mike-Heneghan
Copy link
Contributor Author

…tton and store target node data

- Users can navigate backwards through a flow to a specific node via the back or change buttons
- On click of back or change track the initiator and some metadata of target node by updating the analytics log
@Mike-Heneghan Mike-Heneghan force-pushed the mh/analytics-track-back-and-change branch from 14fdad3 to aa669d4 Compare November 2, 2023 12:44
@Mike-Heneghan Mike-Heneghan changed the title feat: track a user clicking the back button feat: track a user navigating backwards through flow by node id Nov 2, 2023
@theopensystemslab theopensystemslab deleted a comment from github-actions bot Nov 2, 2023
@Mike-Heneghan Mike-Heneghan marked this pull request as ready for review November 2, 2023 12:58
@Mike-Heneghan Mike-Heneghan requested a review from a team November 2, 2023 12:59
const targetNodeMetadata = getTitleAndTypeFromFlow(nodeId);
console.log("Target node info: ", targetNodeMetadata);
const metadata: Record<string, NodeMetadata> = {};
metadata[`${initiator}`] = targetNodeMetadata;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for this syntax as I was getting errors that the initiator wasn't being used when I was trying to apply is a key in the object creation.

@theopensystemslab theopensystemslab deleted a comment from github-actions bot Nov 2, 2023
Copy link

github-actions bot commented Nov 2, 2023

Removed vultr server and associated DNS entries

@Mike-Heneghan
Copy link
Contributor Author

1 similar comment
@Mike-Heneghan
Copy link
Contributor Author

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies it's taken me awhile to properly get to this one, all working as expected on pizza for me and tracking "back" and "change" from both Result & Review 🙌

Feels like a simple structure to extend in the future like you mention for section navigation and "overrides" 💯

initiator: BackwardsNaviagtionInitiatorType,
) {
const targetNodeMetadata = getTitleAndTypeFromFlow(nodeId);
console.log("Target node info: ", targetNodeMetadata);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: looks like this console.log might be a remnant of local dev and can be dropped before merging? one more below on L318 too

- As per #2357 (comment)
- Remove unecessary logs
@Mike-Heneghan Mike-Heneghan merged commit 9ed89c0 into main Nov 6, 2023
12 checks passed
@Mike-Heneghan Mike-Heneghan deleted the mh/analytics-track-back-and-change branch December 13, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants