Enchance RedisTracking module to be able to track different entries than visitors
Background
Review ~"product analytics" of !48470 (diffs) uncovered that there may be different applications for RedisTracking
module than, tracking unique visitors.
Enhancement
Adjust RedisTracking.track_redis_hll_event
to be able to accept different entries ids to be tracked if necessary. Some possible way of achieving this:
- Make
track_redis_hll_event
able to accept block as parameter, that executed will provide id to be tracked, if not present fall back tovisitor_id
method - Add
event_entity_id
method, that can be overrode in controllers when necessary, that will supply id for tracking
From: @patrickbajao
I wanted to re-use the RedisTracking#trackable_request? but it has the request.format.html? which doesn't apply to this action. So I went with this instead.
Edited by Mikołaj Wawrzyniak