Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ site_url: http://localhost:8080/docs/

theme:
name: material
custom_dir: overrides
favicon: assets/cogstack-logo.png
logo: assets/cogstack-logo.png
icon:
Expand Down Expand Up @@ -93,6 +94,10 @@ plugins:
- search
- termynal

extra:
analytics:
provider: custom

markdown_extensions:
- admonition
- attr_list
Expand Down
20 changes: 20 additions & 0 deletions docs/overrides/partials/integrations/analytics/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{#-
PostHog analytics integration (custom provider).
Loads on every page; works with instant navigation via location$.
-#}
<script>
!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.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 capture register register_once register_for_session unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group identify setPersonProperties setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags resetGroups onFeatureFlags addFeatureFlagsHandler onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep".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_kCks07Y0m56WvCKnS4RjZ4bp3HePHkma8MvNmBFfPvL', {
cookieless_mode: 'always',
api_host: 'https://b.cogstack.org',
ui_host: 'https://eu.posthog.com',
defaults: '2026-01-30'
});
document.addEventListener("DOMContentLoaded", function() {
if (typeof location$ !== "undefined") {
location$.subscribe(function(url) {
if (window.posthog) posthog.capture("$pageview", { $current_url: url.href });
});
}
});
</script>
Loading