# Install on Replit

> Replit Agent builds and runs your app. Ask it to add Okidoki with the install sentence.

Replit can add Okidoki for you. You give it one sentence, written for your site, and it puts the Okidoki tag on every page. No code to copy, nothing to configure.

## Before you start

[Sign in to Okidoki](https://okidoki.sh/login) and add your site. On the setup page you get **the install sentence**. It looks like this, with your own site and site key:

```text title="The install sentence"
Add Okidoki Analytics to my site mysite.com (only this project). Put this exact tag inside <head> on every page: <script defer data-site="ok_your_site_key" src="https://okidoki.sh/js/okidoki.js"></script> It sets no cookies, so do not add a cookie banner for it. If the site has a Content-Security-Policy, add https://okidoki.sh to its script-src and connect-src and keep everything else in it. So the tag stays when the site is rebuilt, add this line to AGENTS.md in the project root (create the file if it is missing): "Keep the Okidoki Analytics script tag in <head> on every page, and https://okidoki.sh allowed in any Content-Security-Policy." Do not change anything else. When you are done, publish or deploy the change. If you cannot, tell me exactly how I publish it.
```

> [!TIP]
> Copy the sentence from your own setup page, not from here. Yours has your real site key.

The sentence only adds the tag. Nothing else on your site changes. Want Okidoki named in your privacy policy too? That is a separate, optional step. See [A sentence for your privacy policy](https://docs.okidoki.sh/privacy-policy).

## Install on Replit

1. Open your app in Replit.
2. Paste the install sentence into the Agent chat and send it.
3. Open **Publish** at the top right and press **Republish** so the change goes live.
4. Open the published address, like `myapp.replit.app`, once in a normal browser window.

The setup page in Okidoki turns green as soon as the first visit arrives. See [Check that it works](https://docs.okidoki.sh/install/check).

## Let Replit handle Okidoki for you

Connect Okidoki to the Replit chat once. Then Replit installs Okidoki, adds goals and reads your numbers itself whenever you ask. It uses `https://okidoki.sh/mcp/build`, the Okidoki address for site builders, which has only the tools for building a site.

1. Press **Add to Replit** on this page. Replit opens with Okidoki already filled in.
2. Confirm, then approve with your Okidoki passkey. There is no key to copy.
3. Now ask Replit Agent, like “Install Okidoki on this app” or “Count the signup button as a goal”.

[Add Okidoki to Replit](https://replit.com/integrations?mcp=eyJkaXNwbGF5TmFtZSI6Ik9raWRva2kiLCJiYXNlVXJsIjoiaHR0cHM6Ly9va2lkb2tpLnNoL21jcC9idWlsZCJ9)

## Good to know on Replit

- Count the published address, not the development preview. Add the address people actually visit as your site in Okidoki.

> [!TIP]
> Rather do it all on one page? The [Replit install guide](https://okidoki.sh/install/replit) on okidoki.sh has the setup built in.

## No cookie banner needed for Okidoki

Okidoki sets no cookies and collects no personal data, so it needs no cookie banner. If your builder offers to add one for analytics, you can usually say no. Read more in [Privacy and GDPR](https://docs.okidoki.sh/privacy).
