Install Okidoki
Three ways to add Okidoki to a site, and which one to pick.
Okidoki is one small script, under 1.5 KB, that loads after your page. There are three ways to add it. They all end up the same: the script on every page of your site.
| Your site is made with | Do this | Guide |
|---|---|---|
| Lovable, Bolt, v0, Replit, Cursor or another AI tool | Paste the install sentence into the chat | AI builders |
| Framer, Webflow, Wix, Squarespace, Shopify or WordPress | Paste the script tag into the head code box | Website builders |
| Your own code | Add the React component or the script tag | React and Next.js, Any other site |
You find the sentence, the script tag and the React component on the setup page of your site in Okidoki, with your own site key already in them.
#AI builders
The install sentence is written for the AI that built your site. It names your site, says exactly where the tag goes, and asks the builder to:
- leave out a cookie banner for Okidoki, since Okidoki sets no cookies,
- add
https://okidoki.shtoscript-srcandconnect-srcif the site has a Content Security Policy, and keep everything else in it, - add a line to
AGENTS.md, so the tag stays when the site is rebuilt, - change nothing else, and publish or deploy the change when it is done, or tell you exactly how.
It only adds the tag. Under the sentence is a switch, Add a line about Okidoki to my privacy policy. With it on, the same sentence also adds a line about Okidoki to your privacy policy, so there is still only one sentence to paste. See A sentence for your privacy policy. Paste it, let the builder publish, and open your site once.
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.#Website builders
Builders without an AI chat have a box for code in the head of every page. Paste the script tag there:
<script defer data-site="ok_your_site_key" src="https://okidoki.sh/js/okidoki.js"></script>#Pick your builder
#What the site key is
data-site holds your site key, like ok_7f3kq2m9xa. It tells Okidoki which site a visit belongs to. It is not a secret: anyone can see it in your page, and it can only be used to send visits, not to read anything.
Okidoki only counts visits to the address you added and its subdomains. If you added mysite.com, visits to www.mysite.com and shop.mysite.com count too, but a copy of your site on another address does not.
#Someone else looks after your site?
Under Does someone else look after your website? on the setup page, press Send the steps and type their email address. Okidoki mails them the install sentence, the steps for your builder and the guide, in your language, from Okidoki. Their answer comes to your own address, so save your account first. To stop misuse, the steps can go to the same address a few times a day at most. You can also copy the steps, or write to us if you are stuck.
#After you install
Open your site once. The setup page turns green when the first visit arrives. If it does not, see Check that it works.
Once visits come in, the install box under Settings → Site folds into one line that says Okidoki is on the site and when the last visit came. A link opens the install again, for example when you move to a new builder.