mirror of
https://github.com/welpo/tabi.git
synced 2025-11-23 02:00:25 +01:00
Merge 6fb926b52a into ab4bcd5695
This commit is contained in:
commit
7b42f8775f
4 changed files with 13 additions and 4 deletions
|
|
@ -383,7 +383,7 @@ service = "goatcounter"
|
||||||
# Unique identifier for tracking.
|
# Unique identifier for tracking.
|
||||||
# For GoatCounter, this is the code you choose during signup.
|
# For GoatCounter, this is the code you choose during signup.
|
||||||
# For Umami, this is the website ID.
|
# For Umami, this is the website ID.
|
||||||
# For Plausible, this is the domain name (e.g. "example.com").
|
# For Plausible, this is the random script name without the extension (e.g. "pa-XXXXXX") or the domain name (legacy mode, e.g. "example.com").
|
||||||
# Note: Leave this field empty if you're self-hosting GoatCounter.
|
# Note: Leave this field empty if you're self-hosting GoatCounter.
|
||||||
# id = "yourID"
|
# id = "yourID"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -835,7 +835,7 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`.
|
||||||
- `id`: The unique identifier for your analytics service. This varies based on the service:
|
- `id`: The unique identifier for your analytics service. This varies based on the service:
|
||||||
- For GoatCounter, it's the code chosen during signup. Self-hosted instances of GoatCounter don't require this field.
|
- For GoatCounter, it's the code chosen during signup. Self-hosted instances of GoatCounter don't require this field.
|
||||||
- For Umami, it's the website ID.
|
- For Umami, it's the website ID.
|
||||||
- For Plausible, it's the domain name.
|
- For Plausible, it's either the random script name without the extension (e.g. `"pa-XXXXXX"`) or the domain name (legacy mode).
|
||||||
|
|
||||||
- `self_hosted_url`: Optional. Use this field to specify the URL for self-hosted instances of your chosen analytics service. The base URL differs based on your specific setup. Some examples:
|
- `self_hosted_url`: Optional. Use this field to specify the URL for self-hosted instances of your chosen analytics service. The base URL differs based on your specific setup. Some examples:
|
||||||
- For GoatCounter: `"https://stats.example.com"`
|
- For GoatCounter: `"https://stats.example.com"`
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,19 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% elif analytics_service == "plausible" %}
|
{% elif analytics_service == "plausible" %}
|
||||||
|
{% if analytics_id is matching("^pa-[^\.]+$") %}
|
||||||
|
{# Use new script available in Plausible 3.1.0 or later #}
|
||||||
|
<script async src="{% if self_hosted_url %}{{ self_hosted_url ~ '/js/' }}{% else %}https://plausible.io/js/{% endif %}{{ analytics_id }}.js"></script>
|
||||||
|
<script>
|
||||||
|
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
|
||||||
|
plausible.init()
|
||||||
|
</script>
|
||||||
|
{% else %}
|
||||||
<script
|
<script
|
||||||
defer
|
defer
|
||||||
data-domain="{{ analytics_id }}"
|
data-domain="{{ analytics_id }}"
|
||||||
src="{% if self_hosted_url %}{{ self_hosted_url ~ '/js/plausible.js' }}{% else %}https://plausible.io/js/script.js{% endif %}"
|
src="{% if self_hosted_url %}{{ self_hosted_url ~ '/js/plausible.js' }}{% else %}https://plausible.io/js/script.js{% endif %}"
|
||||||
></script>
|
></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ custom_subset = true
|
||||||
# Unique identifier for tracking.
|
# Unique identifier for tracking.
|
||||||
# For GoatCounter, this is the code you choose during signup.
|
# For GoatCounter, this is the code you choose during signup.
|
||||||
# For Umami, this is the website ID.
|
# For Umami, this is the website ID.
|
||||||
# For Plausible, this is the domain name (e.g. "example.com").
|
# For Plausible, this is the random script name without the extension (e.g. "pa-XXXXXX") or the domain name (legacy mode, e.g. "example.com").
|
||||||
# Note: Leave this field empty if you're self-hosting GoatCounter.
|
# Note: Leave this field empty if you're self-hosting GoatCounter.
|
||||||
# id = "yourID"
|
# id = "yourID"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue