Statcounter-Code hinzufügen

I added my statcounter code but it appears to not work. Anyone know how to solve this?

No. No one can possibly help answer that question.

If you world like to answer a question that has an answer it should include the following: What did you do? What code did you add. Where did you add it? What happens when you try to run it? What do you do to try to run it? What did you expect to happen?

6 „Gefällt mir“

Let me rephrase: Has anyone got statcounter code working and tracking visitors on their discourse community?

Discourse comes out of the box with a dashboard and reports for various statistics. I believe many also have Google stats.

I see that. But not what I am looking for.

Ich versuche immer noch, das zum Laufen zu bringen.

Hier ist der Code:

Weiß jemand, wie ich das hinzufügen kann?

Du fügst diesen Code im <head>-Bereich einer Theme-Komponente ein. Weitere Informationen dazu findest du hier.

Discourse ist eine Single-Page-Applikation. Daher kann die Implementierung von der Dokumentation abweichen, die Statcounter bereitgestellt hat. Deine Implementierung muss dies berücksichtigen; andernfalls erhältst du nur Statistiken für den ersten Seitenaufruf.

Hier ist ein Beispiel dafür, wie wir Statistiken bei Seitenwechseln für Google Analytics senden (dies ist integriert und funktioniert erst, nachdem du deine Google Analytics-Zugangsdaten in den Admin-Einstellungen hinzugefügt hast).

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/initializers/page-tracking.js#L29-L37

Du musst außerdem sicherstellen, dass die Skripte von Statcounter entweder über deine Theme-Komponente oder in deinen Site-Einstellungen für die CSP (Content Security Policy) freigegeben sind.

1 „Gefällt mir“