Added a configurable site origin to the ConfigReader+Properties extension in the Website library target.

This commit is contained in:
2026-08-25 16:24:03 +02:00
parent 5b2da4eb16
commit 988090a511
4 changed files with 27 additions and 7 deletions
@@ -60,18 +60,14 @@ public struct Analytics: Sendable {
// MARK: Computed
/// The tracker script's attributes: the website id and reporting domains, then each enabled behavior flag; disabled flags are omitted.
/// The tracker script's attributes: the website id, the reporting domains when set, then each enabled behavior flag; disabled flags are omitted.
public var attributes: [Attribute] {
var attributes: [Attribute] = [
.init("data-website-id", value: websiteID),
.init("data-domains", value: domains)
.init("data-website-id", value: websiteID)
]
if !domains.isEmpty {
attributes.append((
name: "data-domains",
value: domains
))
attributes.append(.init("data-domains", value: domains))
}
if excludeHash {