Skip to content

Commit 84d42e8

Browse files
authored
Merge pull request #338 from sandervanhooft/feature/fathom-analytics
feat: add Fathom Analytics integration
2 parents 67fb617 + b5c3979 commit 84d42e8

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,7 @@ SENTRY_TRACES_SAMPLE_RATE=1.0
8181

8282
FILAMENT_SPA=true
8383
FILAMENT_SIDEBAR_ON_DESKTOP=true
84+
85+
# Fathom Analytics (privacy-friendly analytics)
86+
# Get your site ID from https://usefathom.com
87+
FATHOM_SITE_ID=

config/services.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,8 @@
6464
'gravatar' => [
6565
'base_url' => rtrim(env('GRAVATAR_BASE_URL', 'https://www.gravatar.com/avatar'), '/'),
6666
],
67+
68+
'fathom' => [
69+
'site_id' => env('FATHOM_SITE_ID'),
70+
],
6771
];

resources/views/components/app.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ function updateTheme() {
101101

102102
@stack('javascript')
103103
<x-impersonate::banner/>
104+
@if(config('services.fathom.site_id'))
105+
<script src="https://cdn.usefathom.com/script.js" data-site="{{ config('services.fathom.site_id') }}" defer></script>
106+
@endif
104107
{!! app(\App\Settings\GeneralSettings::class)->custom_scripts !!}
105108
</body>
106109
</html>

0 commit comments

Comments
 (0)