Files
zeekay bc4ddf332b chore: rebase the tree onto upstream master fa1a9a60
Mechanically re-derived: bin/debrand runs over a fresh import of
posthog/posthog@fa1a9a60d4 (2026-08-06).
The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker*
entrypoints, compose files, LLM.md and the squashed initial migration
are restored from the shipped tree, same as the previous import.

The prune's import-closure guard kept 21 products the new core now
imports; dropping them is a refactor now, recorded rather than forced.
2026-08-06 01:25:36 -07:00

69 lines
2.6 KiB
TypeScript

import { OnboardingComponentsContext, createInstallation } from 'scenes/onboarding/shared/OnboardingDocsContentWrapper'
import { StepDefinition } from '../steps'
import { DEFAULT_SNIPPET_METHODS, snippetFunctions } from './_snippets/js-snippet-builder'
import { SDK_DEFAULTS_DATE } from './_snippets/sdkDefaults'
export const getRetoolSteps = (ctx: OnboardingComponentsContext): StepDefinition[] => {
const { CodeBlock, Markdown, CalloutBox, dedent } = ctx
return [
{
title: 'Open custom scripts',
badge: 'required',
content: (
<Markdown>
Retool is a platform for building internal tools. In your Retool app, go to **Settings** &gt;
**Custom Scripts**.
</Markdown>
),
},
{
title: 'Add the Insights snippet',
badge: 'required',
content: (
<>
<Markdown>Add the following code to the **Head** section:</Markdown>
<CodeBlock
blocks={[
{
language: 'html',
file: 'Head section',
code: dedent`
<script>
${snippetFunctions(DEFAULT_SNIPPET_METHODS)}
insights.init('<ph_project_token>', {
api_host: '<ph_client_api_host>',
defaults: '${SDK_DEFAULTS_DATE}'
})
</script>
`,
},
]}
/>
</>
),
},
{
title: 'Verify installation',
badge: 'recommended',
content: (
<>
<Markdown>
Save and refresh your app. Insights will now automatically capture pageviews, clicks, and other
events as your app is used.
</Markdown>
<CalloutBox type="fyi" title="Learn more">
<Markdown>
See the [Retool integration docs](https://hanzo.ai/docs/libraries/retool) for more
details.
</Markdown>
</CalloutBox>
</>
),
},
]
}
export const RetoolInstallation = createInstallation(getRetoolSteps)