Skip to content

Commit

Permalink
Remove Fathom custom domain support
Browse files Browse the repository at this point in the history
  • Loading branch information
robdekort committed Apr 10, 2023
1 parent 21b623f commit ce122df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 56 deletions.
57 changes: 4 additions & 53 deletions resources/fieldsets/globals_seo_trackers_analytics.yaml
Original file line number Diff line number Diff line change
@@ -1,81 +1,38 @@
title: 'Globals SEO: Trackers - Analytics'
fields:
-
handle: section_fathom
field:
type: section
instructions: "Configure Fathom. A privacy friendly tracker that doesn't require a cookie notification."
display: Fathom
-
handle: use_fathom
field:
type: toggle
instructions: 'Add Fathom tracking code to your head.'
listable: false
display: Fathom
width: 50
-
handle: fathom_use_custom_domain
field:
type: toggle
instructions: 'Use a custom domain for your Fathom script.'
listable: false
width: 50
display: 'Custom domain'
instructions_position: above
default: false
if:
use_fathom: 'equals true'
-
handle: fathom
field:
width: 50
display: 'Site ID'
instructions: 'Only add the site ID.'
input_type: text
type: text
listable: hidden
validate:
- 'required_if:use_fathom,true'
if:
use_fathom: 'equals true'
-
handle: fathom_custom_script_url
field:
width: 50
display: 'Custom domain'
instructions: 'Add the full script URL.'
input_type: url
type: text
listable: hidden
validate:
- 'required_if:fathom_use_custom_domain,true'
- 'required_if:use_fathom,true'
if:
use_fathom: 'equals true'
fathom_use_custom_domain: 'equals true'
instructions_position: above
antlers: false
-
handle: section_plausible
field:
type: section
instructions: "Configure Plausible. A privacy friendly tracker that doesn't require a cookie notification."
display: Plausible
-
handle: use_plausible
field:
type: toggle
instructions: 'Add Plausible tracking code to your head.'
listable: false
display: Plausible
width: 50
-
handle: plausible_use_custom_script
field:
type: toggle
instructions: 'For when you are you using a self hosted install or proxying the script.'
listable: false
width: 50
display: 'Custom script'
instructions_position: above
default: false
Expand All @@ -84,38 +41,32 @@ fields:
-
handle: plausible
field:
width: 50
display: 'Site Domain'
instructions: 'Specify the domain of your site you wish track visits on.'
input_type: text
type: text
listable: hidden
width: 50
validate:
- 'required_if:use_plausible,true'
if:
use_plausible: 'equals true'
-
handle: plausible_custom_script_url
field:
width: 50
display: 'Custom script'
instructions: 'Add the full script URL.'
input_type: url
type: text
listable: hidden
width: 50
validate:
- 'required_if:plausible_use_custom_domain,true'
if:
use_plausible: 'equals true'
plausible_use_custom_script: 'equals true'
instructions_position: above
antlers: false
-
handle: section_cloudflare
field:
type: section
instructions: 'Configure Cloudflare Web Analytics.'
display: 'Cloudflare Web Analytics'
-
handle: use_cloudflare_web_analytics
field:
Expand All @@ -126,9 +77,9 @@ fields:
-
handle: cloudflare_web_analytics
field:
width: 66
display: 'Beacon ID'
input_type: text
width: 50
type: text
listable: hidden
validate:
Expand Down
4 changes: 1 addition & 3 deletions resources/views/snippets/_seo.antlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@
<meta name="google-site-verification" content="{{ seo:google_site_verification }}" />
{{ /if }}
{{ if seo:use_fathom && seo:fathom_use_custom_domain }}
<script src="{{ seo:fathom_custom_script_url }}" site="{{ seo:fathom }}" defer></script>
{{ elseif seo:use_fathom }}
{{ if seo:use_fathom }}
<script src="https://cdn.usefathom.com/script.js" site="{{ seo:fathom }}" defer></script>
{{ /if }}
Expand Down

0 comments on commit ce122df

Please sign in to comment.