mirror of
https://github.com/Queer-Lexikon/regenbogenkarte
synced 2024-11-22 20:23:13 +00:00
23 lines
493 B
TypeScript
23 lines
493 B
TypeScript
|
declare global {
|
||
|
interface Window {
|
||
|
goatcounter: {
|
||
|
path: (p: any) => string;
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const addGoatCounter = () => {
|
||
|
window.goatcounter = {
|
||
|
path: function (p: any) {
|
||
|
return location.host + p;
|
||
|
},
|
||
|
};
|
||
|
|
||
|
let goatcounter = document.createElement("script");
|
||
|
goatcounter.src = "//ziege.queer-lexikon.net/count.js";
|
||
|
goatcounter.async = true;
|
||
|
goatcounter.setAttribute("data-goatcounter", "https://ziege.queer-lexikon.net/count");
|
||
|
|
||
|
document.head.appendChild(goatcounter);
|
||
|
};
|