Skip to content

New analytics directory#2977

Merged
lmuntaner merged 2 commits intomainfrom
lm-new-directory-analytics
Apr 1, 2025
Merged

New analytics directory#2977
lmuntaner merged 2 commits intomainfrom
lm-new-directory-analytics

Conversation

@lmuntaner
Copy link
Copy Markdown
Contributor

@lmuntaner lmuntaner commented Apr 1, 2025

Motivation

Funnels will be how we trigger events. That means we will create funnel instances.

To keep it maintainable I suggest we have them all under the same directory: "utils/analytics".

Changes

  • New directory "analytics" under "utils".
  • Move analytics.ts and Funnel.ts along the test.
  • Update imports of analyitcs.

Tests

Only files moved.


🟡 Some screens were changed

@lmuntaner lmuntaner marked this pull request as ready for review April 1, 2025 07:04
@lmuntaner lmuntaner requested review from LXIF and sea-snake April 1, 2025 07:04
LXIF
LXIF previously requested changes Apr 1, 2025
Copy link
Copy Markdown
Contributor

@LXIF LXIF left a comment

Choose a reason for hiding this comment

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

Looks good apart from typo in folder name!

Comment thread src/frontend/src/callback-flow.ts Outdated
@@ -1,5 +1,5 @@
import { callbackFlow } from "$src/flows/redirect";
import { analytics, initAnalytics } from "$src/utils/analytics";
import { analytics, initAnalytics } from "$src/utils/analyitcs/analytics";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: please rename analyitcs to analytics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks!! Done!

@lmuntaner lmuntaner requested a review from LXIF April 1, 2025 08:58
@@ -1,5 +1,5 @@
import { callbackFlow } from "$src/flows/redirect";
import { analytics, initAnalytics } from "$src/utils/analytics";
import { analytics, initAnalytics } from "$src/utils/analytics/analytics";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While we're at it, it might be nice to add an index.ts to the folder to re-export all folder content that should be used and available outside the folder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah yes, good idea, I second this.

(was not aware initially of this pattern but it makes sense, similar to how it is done in rust)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We agreed to do it as part of the new Svelte project structure.

@lmuntaner lmuntaner requested a review from sea-snake April 1, 2025 10:47
@lmuntaner lmuntaner dismissed LXIF’s stale review April 1, 2025 10:50

Typo fixed. We will be changing the folder structure as part of the Svelte refactor.

@lmuntaner lmuntaner added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit ab5b375 Apr 1, 2025
71 checks passed
@lmuntaner lmuntaner deleted the lm-new-directory-analytics branch April 1, 2025 10:57
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.

3 participants