generated from nhcarrigan/template
chore: backup configs
This commit is contained in:
14
components/analytics/about.json
Normal file
14
components/analytics/about.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Analytics",
|
||||
"component": true,
|
||||
"license_url": null,
|
||||
"about_url": null,
|
||||
"authors": null,
|
||||
"theme_version": null,
|
||||
"minimum_discourse_version": null,
|
||||
"maximum_discourse_version": null,
|
||||
"assets": {},
|
||||
"color_schemes": {},
|
||||
"modifiers": {},
|
||||
"learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
|
||||
}
|
2
components/analytics/common/head_tag.html
Normal file
2
components/analytics/common/head_tag.html
Normal file
@ -0,0 +1,2 @@
|
||||
<script id="analytics" defer domain="nhcarrigan.com" data-domain="nhcarrigan.com" src="https://analytics.nhcarrigan.com/js/script.file-downloads.hash.outbound-links.pageview-props.revenue.tagged-events.js" event-domain="forum.nhcarrigan.com"></script>
|
||||
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
@ -0,0 +1,8 @@
|
||||
import { apiInitializer } from "discourse/lib/api";
|
||||
|
||||
export default apiInitializer((api) => {
|
||||
const analytics = document.getElementById('analytics');
|
||||
const title = document.querySelector('title');
|
||||
analytics.setAttribute('event-page', title.innerText ?? "NHCarrigan Forum");
|
||||
analytics.setAttribute('event-path', window.location.pathname);
|
||||
});
|
Reference in New Issue
Block a user