According to the README [1]: > To mask previously collected IPs, use: > Ahoy::Visit.find_each do |visit| > visit.update_column :ip, Ahoy.mask_ip(visit.ip) > end We're adapting the code with our version, since we use the `Visit` model instead of the `Ahoy::Visit` model. [1] https://github.com/ankane/ahoy/blob/v5.0.2/README.md#ip-masking