Raccoglie eventi aggregati dietro consenso cookie, senza PII né tracking su admin/regia/live/replay; GA4 resta invariato. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
780 B
Ruby
20 lines
780 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rails_helper"
|
|
|
|
RSpec.describe Analytics::PathNormalizer do
|
|
it "normalizza UUID e token" do
|
|
expect(described_class.normalize("/clubs/461d369a-104c-4d3c-8860-1518b4e95d35/billing"))
|
|
.to eq("/clubs/:id/billing")
|
|
end
|
|
|
|
it "esclude admin, regia, live player e replay" do
|
|
expect(described_class.excluded?("/admin/sessions")).to be(true)
|
|
expect(described_class.excluded?("/regia/abc")).to be(true)
|
|
expect(described_class.excluded?("/live/461d369a-104c-4d3c-8860-1518b4e95d35")).to be(true)
|
|
expect(described_class.excluded?("/replay/461d369a-104c-4d3c-8860-1518b4e95d35")).to be(true)
|
|
expect(described_class.excluded?("/live")).to be(false)
|
|
expect(described_class.excluded?("/prezzi")).to be(false)
|
|
end
|
|
end
|