We have used redirect module in one of the my drupal 8 website but we see redirect counter column is missing. We are unable to count no of hits on particular URLS. When this features will be implement on drupal 8. any one please suggest how to add no. of hits count column on redirect list page with redirect module.

Comments

DhirendraGrazitti created an issue. See original summary.

dhirendragrazitti’s picture

Assigned: dhirendragrazitti » Unassigned
Issue summary: View changes
berdir’s picture

Priority: Critical » Normal

This feature has been removed on purpose as it is not reliable since redirects are now cached.

This is not critical, it was done on purpose.

I have no plans to add this back but if someone wants to do so, I suggest as a separate, optional module as tracking this and last access was a considerable performance hit and as mentioned, is practically impossible to do reliably, especially when you are using something like varnish.

dhirendragrazitti’s picture

Thanks for the Information Berdir .

so please mention separate module for redirect counter column in redirect list page.

kenorb’s picture

FYI: The counter column is present when using Redirect 404 sub-module.
I think the counter would be great, even if it's cached, in order to find which redirect entries are not used anymore, even if it says 1-5 instead of 100. Another way is to have Last accessed column as Redirect 404 sub-module, so less headache with counting (even if it's cached).

thelioness22’s picture

I would also love to have this feature added back in. Maybe with a way to enable it only if you want to use those columns and with some warning text about performance and caching. We use it to determine when to delete super-old redirects from legacy sites which were imported -- after a certain amount of time when they haven't been accessed, they are removed. 100% accuracy isn't so important for us in a count; it's more of an idea of what redirects are still more commonly accessed (do we have an old link published somewhere?) and what redirects have not been accessed at all in X amount of time. Is there anyone willing to work on this as a setting that can be turned on in this module but isn't enabled by default?

sam152’s picture

Status: Active » Closed (outdated)

Spoke to @Berdir on slack and he indicated his preference was to keep this as a contrib. I needed this for the same reasons as @TheLioness22, so I have spun off the following contrib: https://www.drupal.org/project/redirect_metrics

Considering this closed, can always open another issue to combine the modules if that becomes preferable in the future.

mkindred’s picture

Does this mean that redirect no longer deletes redirects that haven't been accessed recently? I just noticed that the 'Delete redirects that have not been accessed for' setting is gone now.

berdir’s picture

Per the comment above, those features have been moved to the extra modules, the project page there explains quite well why (it's expensive and not reliable).

mkindred’s picture

Ah, I missed the 'stale redirects' mention on the redirect_metrics page. Thanks.