This commit is contained in:
56
src/components/Posthog.astro
Normal file
56
src/components/Posthog.astro
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<script is:inline>
|
||||||
|
!(function (t, e) {
|
||||||
|
var o, n, p, r;
|
||||||
|
e.__SV ||
|
||||||
|
((window.posthog = e),
|
||||||
|
(e._i = []),
|
||||||
|
(e.init = function (i, s, a) {
|
||||||
|
function g(t, e) {
|
||||||
|
var o = e.split(".");
|
||||||
|
2 == o.length && ((t = t[o[0]]), (e = o[1])),
|
||||||
|
(t[e] = function () {
|
||||||
|
t.push([e].concat(Array.prototype.slice.call(arguments, 0)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
((p = t.createElement("script")).type = "text/javascript"),
|
||||||
|
(p.async = !0),
|
||||||
|
(p.src = s.api_host + "/static/array.js"),
|
||||||
|
(r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(
|
||||||
|
p,
|
||||||
|
r
|
||||||
|
);
|
||||||
|
var u = e;
|
||||||
|
for (
|
||||||
|
void 0 !== a ? (u = e[a] = []) : (a = "posthog"),
|
||||||
|
u.people = u.people || [],
|
||||||
|
u.toString = function (t) {
|
||||||
|
var e = "posthog";
|
||||||
|
return (
|
||||||
|
"posthog" !== a && (e += "." + a), t || (e += " (stub)"), e
|
||||||
|
);
|
||||||
|
},
|
||||||
|
u.people.toString = function () {
|
||||||
|
return u.toString(1) + ".people (stub)";
|
||||||
|
},
|
||||||
|
o =
|
||||||
|
"capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId setPersonProperties".split(
|
||||||
|
" "
|
||||||
|
),
|
||||||
|
n = 0;
|
||||||
|
n < o.length;
|
||||||
|
n++
|
||||||
|
)
|
||||||
|
g(u, o[n]);
|
||||||
|
e._i.push([i, s, a]);
|
||||||
|
}),
|
||||||
|
(e.__SV = 1));
|
||||||
|
})(document, window.posthog || []);
|
||||||
|
posthog.init("phc_LaGA9fvYGcEMPtMiJRIAwFsTMyaZaQhtA578GMvT7L7", {
|
||||||
|
api_host: "https://eu.i.posthog.com",
|
||||||
|
person_profiles: "identified_only",
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { SEO } from "astro-seo";
|
import { SEO } from "astro-seo";
|
||||||
|
import Posthog from "../components/Posthog.astro";
|
||||||
|
|
||||||
const { frontmatter } = Astro.props;
|
const { frontmatter } = Astro.props;
|
||||||
import "./MarkdownLayout.css";
|
import "./MarkdownLayout.css";
|
||||||
---
|
---
|
||||||
@@ -41,5 +43,6 @@ import "./MarkdownLayout.css";
|
|||||||
<footer>
|
<footer>
|
||||||
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
<Posthog />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { SEO } from "astro-seo";
|
import { SEO } from "astro-seo";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
|
import Posthog from "../../components/Posthog.astro";
|
||||||
|
|
||||||
const posts = await Astro.glob("./posts/*.md");
|
const posts = await Astro.glob("./posts/*.md");
|
||||||
|
|
||||||
@@ -68,5 +69,6 @@ posts.sort((a, b) => {
|
|||||||
<footer class="mt-12">
|
<footer class="mt-12">
|
||||||
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
<Posthog />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { SEO } from "astro-seo";
|
|||||||
import { Icon } from "astro-icon/components";
|
import { Icon } from "astro-icon/components";
|
||||||
import Section from "../components/Section.astro";
|
import Section from "../components/Section.astro";
|
||||||
import { projects } from "../projects";
|
import { projects } from "../projects";
|
||||||
|
import Posthog from "../components/Posthog.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -127,5 +128,6 @@ import { projects } from "../projects";
|
|||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", onMount);
|
window.addEventListener("DOMContentLoaded", onMount);
|
||||||
</script>
|
</script>
|
||||||
|
<Posthog />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { SEO } from "astro-seo";
|
|||||||
import { getProject, projects } from "../../projects";
|
import { getProject, projects } from "../../projects";
|
||||||
import Section from "../../components/Section.astro";
|
import Section from "../../components/Section.astro";
|
||||||
import { Icon } from "astro-icon/components";
|
import { Icon } from "astro-icon/components";
|
||||||
|
import Posthog from "../../components/Posthog.astro";
|
||||||
|
|
||||||
export const getStaticPaths = (() => {
|
export const getStaticPaths = (() => {
|
||||||
return projects.map(({ id }) => ({
|
return projects.map(({ id }) => ({
|
||||||
@@ -110,5 +111,6 @@ const image = (await import(`../../assets/${project.id}.png`)).default;
|
|||||||
<footer class="mt-12">
|
<footer class="mt-12">
|
||||||
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
<p class="text-secondary text-center">© 2024 Zvonimir Rudinski</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
<Posthog />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user