Turned the analytics tracker off by default in the template.
This commit is contained in:
@@ -120,4 +120,16 @@ struct AnalyticsTests {
|
||||
])
|
||||
}
|
||||
|
||||
@Test
|
||||
func `omits the domains filter when it is empty`() {
|
||||
// The tracker reads the attribute as an allowlist, so rendering it empty would filter out every host rather than none.
|
||||
let analytics = Analytics(
|
||||
scriptURL: "https://analytics.example.com/script",
|
||||
websiteID: "id-123",
|
||||
domains: ""
|
||||
)
|
||||
|
||||
#expect(!analytics.attributes.map(\.name).contains("data-domains"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user