Make sure visit and visitor tokens are different

Andrew committed May 02, 2018
commit e9aa307d104ec25f6412b190a71331b064ee23ef
Showing 1 changed file with 2 additions and 2 deletions
ahoy/tracker.rb b/lib/ahoy/tracker.rb +2 -2
@@ @@ -241,11 +241,11 @@ module Ahoy
end
def visit_hash
- @visit_hash ||= Digest::UUID.uuid_v5(UUID_NAMESPACE, [Ahoy.mask_ip(request.remote_ip), request.user_agent].join("/"))
+ @visit_hash ||= Digest::UUID.uuid_v5(UUID_NAMESPACE, ["visit", Ahoy.mask_ip(request.remote_ip), request.user_agent].join("/"))
end
def visitor_hash
- visit_hash
+ @visitor_hash ||= Digest::UUID.uuid_v5(UUID_NAMESPACE, ["visitor", Ahoy.mask_ip(request.remote_ip), request.user_agent].join("/"))
end
def visit_cookie