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

Implement analytics for LinkBundle and Link #89

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jongalloway
Copy link
Collaborator

@jongalloway jongalloway commented Jan 8, 2025

Fixes #85

Implement tracking for DateTime and Referrer Data for LinkBundle and Clicks and DateTime for Link.

  • Shared/LinkBundle.cs

    • Add CreatedDate property to track the creation date of the LinkBundle.
    • Add ReferrerData property to track the referrer data of the LinkBundle.
  • Shared/Link.cs

    • Add Clicks property to track the number of clicks for the Link.
    • Add CreatedDate property to track the creation date of the Link.
  • Api/Functions/CreateLinkBundle.cs

    • Set the CreatedDate property of the LinkBundle to the current date and time when creating a new LinkBundle.
    • Set the ReferrerData property of the LinkBundle to the referrer data from the request headers.
  • Api/Functions/GetLinkBundle.cs

    • Increment the Clicks property of each Link when a LinkBundle is retrieved.
    • Update the CreatedDate property of each Link to the current date and time when a LinkBundle is retrieved.
  • Client/Shared/LinkBundleDetails.razor

    • Display the CreatedDate property of the LinkBundle.
    • Display the ReferrerData property of the LinkBundle.
  • Client/Shared/LinkBundleItem.razor

    • Display the Clicks property of the Link.
    • Display the CreatedDate property of the Link.

For more details, open the Copilot Workspace session.

Fixes #85

Implement tracking for DateTime and Referrer Data for `LinkBundle` and Clicks and DateTime for `Link`.

* **Shared/LinkBundle.cs**
  - Add `CreatedDate` property to track the creation date of the `LinkBundle`.
  - Add `ReferrerData` property to track the referrer data of the `LinkBundle`.

* **Shared/Link.cs**
  - Add `Clicks` property to track the number of clicks for the `Link`.
  - Add `CreatedDate` property to track the creation date of the `Link`.

* **Api/Functions/CreateLinkBundle.cs**
  - Set the `CreatedDate` property of the `LinkBundle` to the current date and time when creating a new `LinkBundle`.
  - Set the `ReferrerData` property of the `LinkBundle` to the referrer data from the request headers.

* **Api/Functions/GetLinkBundle.cs**
  - Increment the `Clicks` property of each `Link` when a `LinkBundle` is retrieved.
  - Update the `CreatedDate` property of each `Link` to the current date and time when a `LinkBundle` is retrieved.

* **Client/Shared/LinkBundleDetails.razor**
  - Display the `CreatedDate` property of the `LinkBundle`.
  - Display the `ReferrerData` property of the `LinkBundle`.

* **Client/Shared/LinkBundleItem.razor**
  - Display the `Clicks` property of the `Link`.
  - Display the `CreatedDate` property of the `Link`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/the-urlist/blazor-static-web-apps/issues/85?shareId=XXXX-XXXX-XXXX-XXXX).
@jongalloway jongalloway marked this pull request as draft January 8, 2025 23:39
@jongalloway jongalloway requested a review from Copilot January 8, 2025 23:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • Client/Shared/LinkBundleDetails.razor: Evaluated as low risk

Api/Functions/GetLinkBundle.cs Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 8, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-beach-0248a5a0f-89.eastus2.5.azurestaticapps.net

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jongalloway jongalloway added the enhancement New feature or request label Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-beach-0248a5a0f-89.eastus2.5.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Up Next
Development

Successfully merging this pull request may close these issues.

Implement Analytics
1 participant