diff --git a/config/_default/params.toml b/config/_default/params.toml index a9e0167c..db391cb7 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -70,7 +70,7 @@ fingerprintAlgorithm = "sha256" # site = "ABC12345" # domain = "llama.yoursite.com" -[plausible] +[plausibleAnalytics] # domain = "blog.yoursite.com" # event = "" # script = "" diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 8df9a132..94b687a5 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -170,9 +170,9 @@ Many of the article defaults here can be overridden on a per article basis by sp |`taxonomy.showTermCount`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.| |`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.| -|`plausible.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| -|`plausible.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| -|`plausible.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| +|`plausibleAnalytics.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| +|`plausibleAnalytics.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| +|`plausibleAnalytics.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.| |`verification.bing`|_Not set_|The site verification string provided by Bing to be included in the site metadata.| |`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.| diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index f2b00b87..17f2987f 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -31,7 +31,7 @@ To enable Plausible analytics support, simply provide the domain of the website ```toml # config/_default/params.toml -[plausible] +[plausibleAnalytics] domain = "blog.yoursite.com" event = "https://plausible.yoursite.com/api/event" script = "https://plausible.yoursite.com/js/script.js" diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 012909f2..64a2e350 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -6,11 +6,11 @@ {{ end }} {{ end }} - {{ with site.Params.plausible.domain }} + {{ with site.Params.plausibleAnalytics.domain }} + data-api="{{ default "https://plausible.io/api/event" site.Params.plausibleAnalytics.event }}" + src="{{ default "https://plausible.io/js/script.js" site.Params.plausibleAnalytics.script }}"> {{ end }} {{ template "_internal/google_analytics.html" . }} {{ end }} \ No newline at end of file