Skip to content

Commit 9506b38

Browse files
mtelverssabine
andauthored
Use Posthog rather than Plausible (#3101)
* Use Posthog rather than Plausible * keep Plausible script until end of Q2/25 --------- Co-authored-by: sabine <[email protected]>
1 parent b3b5fb0 commit 9506b38

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

data/pages/privacy_policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ As a visitor to the OCaml.org website:
2020
- No information is mined or harvested for personal and behavioral trends
2121
- No information is monetized
2222

23-
We collect some anonymous usage data for statistical purposes. The goal is to track overall trends in our website traffic, it is not to track individual visitors. All the data is in aggregate only. No personal data is collected. You can view the data we collect [here](https://plausible.ci.dev/ocaml.org).
23+
We collect some anonymous usage data for statistical purposes. The goal is to track overall trends in our website traffic, it is not to track individual visitors. All the data is in aggregate only. No personal data is collected. You can view the data we collect [here](https://posthog.ci.dev/shared/seqtamWuMXLwxJEAX1XNjwhzciAajw).
2424

2525
Data collected includes referral sources, top pages, visit duration, information from the devices (device type, operating system, country and browser) used during the visit and more.
2626

src/ocamlorg_frontend/layouts/layout.eml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,15 @@ inner =
101101
<script defer src="<%s Ocamlorg_static.Asset.url "vendors/alpine-clipboard.js" %>"></script>
102102
<script defer src="<%s Ocamlorg_static.Asset.url "vendors/alpine.min.js" %>"></script>
103103
<script defer src="<%s Ocamlorg_static.Asset.url "vendors/htmx.min.js" %>"></script>
104+
<!-- FIXME: remove plausible script when Plausible is retired -->
104105
<script defer data-domain="ocaml.org" src="https://plausible.ci.dev/js/script.js"></script>
106+
<script>
107+
!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.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/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="init me ws ys ps bs capture je Di ks register register_once register_for_session unregister unregister_for_session Ps getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty Es $s createPersonProfile Is opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing Ss debug xs getPageViewId captureTraceFeedback captureTraceMetric".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
108+
posthog.init('phc_OCqqItGZelQ6GJ5spVGiClX6FMqxWoDGBloGJVVSY5n', {
109+
api_host: 'https://posthog.ci.dev',
110+
person_profiles: 'identified_only', // or 'always' to create profiles for anonymous users as well
111+
})
112+
</script>
105113
<% if use_swiper then ( %>
106114
<link rel="stylesheet" href="<%s Ocamlorg_static.Asset.url "vendors/swiper-bundle.min.css" %>">
107115
<link rel="alternate" type="application/rss+xml" title="OCaml Planet Feed" href="/planet.xml">

0 commit comments

Comments
 (0)