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

Add event per page #2869

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Add event per page #2869

merged 1 commit into from
Feb 19, 2025

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented Feb 18, 2025

Motivation

Better understand where users land when visiting Internt Identity.

Changes

  • Add different events depending on the flow that the user visits.

Tests

No new functionality.


🟡 Some screens were changed

@lmuntaner lmuntaner requested a review from LXIF February 18, 2025 09:31
@lmuntaner lmuntaner marked this pull request as ready for review February 18, 2025 09:31
@lmuntaner
Copy link
Collaborator Author

@LXIF please review

@lmuntaner lmuntaner requested a review from sea-snake February 18, 2025 11:34
@lmuntaner
Copy link
Collaborator Author

@sea-snake please review

@@ -18,6 +18,7 @@ void createSpa(async (connection) => {
// Figure out if user is trying to add a device. If so, use the anchor from the URL.
const addDeviceAnchor = getAddDeviceAnchor();
if (nonNullish(addDeviceAnchor)) {
analytics.event("page-add-new-device");
Copy link
Contributor

@sea-snake sea-snake Feb 19, 2025

Choose a reason for hiding this comment

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

Looking at the Plausible API spec and tracking lib, shouldn't this be:

analytics.trackPageview({ url: 'https://identity.ic0.app/device/add' }).

I'm afraid that using custom events instead of pageView events (according to doc a special event type) will cause issues later when we migrate to actual routing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know. I just thought that since we don't know yet the new routes, or even whether there will be new routes for this. It was easier to make events.

Even though the statistics won't be mergeable.

I didn't want to go into the routes discussion yet. We don't even have a plan for Svelte.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, then for now custom events is fine indeed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not idea, but better than nothing

@lmuntaner lmuntaner added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit e2f6e5a Feb 19, 2025
67 checks passed
@lmuntaner lmuntaner deleted the lm-event-per-page branch February 19, 2025 09:00
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