Skip to content

Analytics & Optimization

Trim Old Click Data to Keep the Database Lean

Click history is the largest thing URL Shortify stores, and on a busy site it can grow to millions of rows — enlarging your database and slowing reports. Trim Clicks deletes old click records in one action, keeping every short link intact. You'll find it under URL Shortify → Tools → Trim Clicks, with options to clear clicks older than 30, 60 or 90 days, or to clear all clicks.

When to use it

  • Reports and the dashboard have become slow to load.
  • Your database or backups have grown uncomfortably large.
  • Your data-retention policy says visitor data should not be kept indefinitely.

How to trim click history

  1. Go to URL Shortify → Tools → Trim Clicks.

  2. Choose how much history to remove:

    Option What it clears
    Clear clicks older than 30 days Every click record more than 30 days old
    Clear clicks older than 60 days Every click record more than 60 days old
    Clear clicks older than 90 days Every click record more than 90 days old
    Clear all clicks The entire click history for every link
  3. Confirm the action.

This cannot be undone

Deleted click records are gone permanently. Take a database backup first, and consider exporting your click data to CSV if you may need the history later.

What is and isn't removed

Removed Kept
Individual click records older than the chosen age (or all of them) Every short link, its slug and destination
The detail behind historical reports — referrers, devices, countries, per-click timestamps Groups, tags, domains and settings

Your links keep working exactly as before. Only the recorded history behind them is trimmed.

Keeping the table small in the first place

Trimming is a cure. These reduce the growth:

  • Filter out robot clicks (PRO) so crawlers never create records.
  • Exclude your own IP addresses (PRO) so internal testing isn't recorded.
  • Turn off Tracking on links you don't need statistics for, in the link's own settings.
  • Use Anonymise Clicks Data in Settings → General if you want click counts without storing personal data.

Conclusion

Trimming click data is the fastest way to shrink a bloated database and speed up reports without touching a single short link. Because the deletion is permanent, back up your database — or export your clicks to CSV — before you run it. To reduce how fast the table grows in the first place, filter robots and exclude your own IPs.

FAQs

No. Only click records are deleted. Every link, slug and destination stays exactly as it was and keeps redirecting. Trimming affects only the recorded click history — the analytics detail — behind your links, never the links themselves.

Can I recover click data after trimming it?

Not from within URL Shortify — the deletion is permanent. To get the data back you would need to restore a database backup taken before trimming, or keep a CSV export. Always back up or export before you trim if the history might matter later.

Will my total click counts change after trimming?

Yes. Reports are built from the individual click records, so any period you trim will no longer show its detail or contribute to historical totals. Trim only as far back as you're comfortable losing, and export first if you need a record.

What does "Clear all clicks" do?

It deletes the entire click history for every link in one action, resetting your recorded analytics to empty while leaving all links, groups, tags and settings untouched. Use it only when you want a completely clean slate, and back up first, because it cannot be undone.

How do I stop the clicks table growing so quickly?

Enable Filter Robots and Exclude IP Addresses (both PRO) so crawler and internal-testing hits are never recorded, and disable Tracking on links that don't need statistics. Together these cut the number of new rows added, so you need to trim far less often.

Was this page helpful?