# Wie kann ich Tracking-JS in Discourse einbetten

**URL:** <https://meta.discourse.org/t/how-can-i-embed-tracking-js-into-discourse/161129>\
**Category:** Data & reporting\
**Created:** [17. August 2020 um 11:13 UTC](https://meta.discourse.org/t/how-can-i-embed-tracking-js-into-discourse/161129 "2020-08-17T11:13:58Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jakubgs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jakubgs/32/208790_2.png) [@jakubgs](https://meta.discourse.org/u/jakubgs)\
**Post date:** [17. August 2020 um 11:13 UTC](https://meta.discourse.org/t/how-can-i-embed-tracking-js-into-discourse/161129/1 "2020-08-17T11:13:58Z")

</div>

Ich verwende [Fathom Analytics](https://github.com/usefathom/fathom) und versuche, ein JS-Skript für die Seitenverfolgung einzubetten, das so aussieht:

```html
<!-- Fathom - einfache Website-Analytik - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
	a[h]=a[h]||function(){
		(a[h].q=a[h].q||[]).push(arguments)
	};
	o=f.createElement('script'),
	m=f.getElementsByTagName('script')[0];
	o.async=1; o.src=t; o.id='fathom-script';
	m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.example.org/tracker.js', 'fathom');
fathom('set', 'siteId', 'ABCDEF');
fathom('trackPageview');
</script>
<!-- / Fathom -->

```

Ich füge dies über die Einstellungen `Anpassen > Theme > Benutzerdefiniertes CSS/HTML` im Bereich `<head>` hinzu.  
Aber beim Laden der Seite schlägt das Abrufen des Fathom-Skripts `tracker.js` fehl:

 ![discource_fathom_err_1](https://global.discourse-cdn.com/meta/original/3X/b/3/b369eee9630334373584bd0fda2f7e223af02e1d.png)  
Und in der Konsole werden weitere Fehler angezeigt:

```plaintext
Uncaught (in promise) no-response: no-response :: [{"url":"https://fathom.example.org/tracker.js"}]
    at a.makeRequest (https://discuss.example.org/javascripts/workbox/workbox-strategies.prod.js:1:2145)

```

Es scheint, als würde Fathom das Abrufen dieses JS-Skripts stören. Wie soll ich das lösen?

Ich nutze `2.6.0.beta1`.

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-embed-tracking-js-into-discourse/161129)._
