Skip to content

Conversation

@zara1504
Copy link

@zara1504 zara1504 commented Apr 3, 2025

OnTrack Component Review

Team Member Name

Zara Danziger
Student ID: s223468285

Component Name

Analytic Services

Files in this Component

  • Analytic-services.Coffee

Component Purpose

The analytic-service component is a way to track and log interactions the user has with the application. It collects data from users who have opened it. This service is used for logging different UI interactions and allows tracking of changes to different variables.

Screenshot

No Screenshot Needed

Component Outcome and Interactions

Expected Outcomes:

  • Logs UI interactions with event categories, labels, and values.
  • Automatically logs changes to scope variables.
  • Stops invalid data from being logged.
  • Ensures event tracking is only for users who consent.

Interactions:

Inputs:

  • Gets event details including category, event name, label, and value.
  • Watches variables for changes to start analytic events.

Outputs:

  • Shows an error if an invalid value is detected.
  • Sends the analytics to $analytics.eventTrack.
  • Ensures that the data is only collected from users who have opted in.

Component Migration Plan

Migration Steps:

  1. Review Existing Component

    • Go over the current component.
    • Identify functionalities.
  2. Set Up Environment

    • Ensure the environment is properly set up and working within the correct branch (9.x).
  3. Create Component

    • Develop a new component in Angular17 TS.
  4. Migrate and Downgrade Component

    • Follow the migration guide steps 3 and 4 to downgrade and migrate the component.
  5. Testing

    • Test the application with the new component on multiple platforms (Google, Safari).
    • Fix any issues before committing any changes.

Component Checklist

  • Compliance with user consent
    • Checks newUserService.currentUser.optInToResearch before logging any events.
  • Logs analytic events.
  • Handles data correctly.
  • Handles errors.
    • Stops tracking if the component is missing.

@LovleenKala
Copy link

Thanks Zara, I’ve gone through your component review for Analytic Services. The purpose and outcome are clearly explained, and I appreciate how you've outlined the migration steps and checklist in a structured way. It's good to see that user consent is prioritized before logging any data. Everything looks well thought out and aligned with the project requirements.

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