A plugin for Publish to include a self-hosted Ackee analytics.
Configure the shared instance of the TrackerConfig
:
TrackerConfig.shared = TrackerConfig(server: URL(string: "https://analytics.example.com")!,
domainID: "your-domain-id")
If you're using a custom tracker file you can specify that as well, but defaults to /tracker.js
at the root of the server URL.
In your theme include the tracker as an additional node in the head on each page you want tracked:
HTML(
...
.ackeeHead(for: ..., on: context.site),
.body(...)
)
Or include .ackeeTracker()
manually in a HTML.HeadContext
.