Phoenix function components.
Put the tag in the <head> of your root layout:
<PrivatusAnalytics.Components.tag nonce={assigns[:csp_nonce]} conn={@conn} />Every attribute is optional. An attribute you leave out uses your config.
Summary
Functions
The Privatus Analytics script tag.
Functions
The Privatus Analytics script tag.
Without a site id or when the tag is not enabled, prints only the queue stub
(with queue_stub={true}) or nothing.
Attributes
site_id(:string) - Overrides the site id.script_host(:string) - Overrides the script host.modules(:list) - Tracker modules, for example["engage", "auto"].excluded_paths(:list) - Path globs the tracker never counts.domains(:any) - Hostnames to count.spa(:string) - One ofauto,history,hashoroff.manual(:boolean) -trueturns off the automatic pageview.enabled(:boolean) -trueorfalseforces the tag on or off.enabled_environments(:list) - Environments that get the tag.env(:atom) - The current environment.extra_attributes(:any) - Otherdata-*attributes, as a map.nonce(:string) - Content Security Policy nonce for the script tags.props(:any) - Page properties, for example%{plan: "pro"}.queue_stub(:boolean) -trueprints the queue stub before the tag.conn(:any) - The conn, for props set withput_props/2and the nonce assign.