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 ability to clear short URL visits #1148

Closed
acelaya opened this issue Aug 6, 2021 · 3 comments · Fixed by #1779
Closed

Add ability to clear short URL visits #1148

acelaya opened this issue Aug 6, 2021 · 3 comments · Fixed by #1779
Labels
Milestone

Comments

@acelaya
Copy link
Member

acelaya commented Aug 6, 2021

Summary

Allow to reset the visits for a short URL, via endpoint or CLI command.

  • DELETE /short-urls/{shortCode}/visits{?domain}
  • short-urls:visits-clear / short-urls:visits-purge (start with the word visits so that it is listed next to short-urls:visits)

Display confirmation on CLI command, stating once done, it cannot be undone.

When shlink-web-client implements the endpoint, also add confirmation where the user needs to perform an action to proceed.

Take into consideration API key roles. An API key should not be allowed to purge visits on a short URL that it cannot fetch (it should work out of the box, but it's worth double checking).

@acelaya acelaya added the feature label Aug 6, 2021
@acelaya
Copy link
Member Author

acelaya commented Jan 18, 2022

A bit of an edge case and not really useful.

Can be done at database level if the specific case ever comes to place.

@UCI-MIND-IT
Copy link

Hi! I was about to create a new feature request issue but managed to find this one. Users in our organization have come across 2 scenarios where this feature would be wonderful:

  • It is common for our Shlink users to test shortlink functionality by visiting a new shortlink that was just created. Shlink will track these "dev/debug visits" in the Visit Stats page.
  • We have prepared a large batch of shortlinks for a new social campaign, but a handful of links have already received visits according to their Visit Stats page despite us not releasing any of these links to the public (only some are marked as coming from a bot or crawler, so we can't rely on the "Exclude potential bots" filter).

For both of these cases, we would like to wipe the Visit Stats clean for the affected shortlinks so we can be assured that the visit stats page reports as much relevant traffic as possible.

Our current band-aid solution is to delete the affected shortlinks and recreate them, which takes time. I checked the CLI entry point documentation for any advanced/hidden features and it seems like there are only options to list visits, but not delete them or manipulate them in any way.

Sorry to revive this years-old ticket, but would you reconsider implementing this feature? If not, how can I go about doing this at the database level? Thank you for your time!

@acelaya acelaya removed the wontfix label Apr 16, 2023
@acelaya acelaya added this to Shlink Apr 16, 2023
@acelaya acelaya added this to the 3.6.0 milestone Apr 16, 2023
@acelaya acelaya moved this to Todo in Shlink Apr 16, 2023
@acelaya acelaya reopened this Apr 16, 2023
@acelaya
Copy link
Member Author

acelaya commented Apr 16, 2023

Re-opening this.

@acelaya acelaya moved this from Todo to In Progress in Shlink May 13, 2023
@acelaya acelaya moved this from In Progress to In review in Shlink May 17, 2023
@github-project-automation github-project-automation bot moved this from In review to Done in Shlink May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants