# Inserting the OptiMonk JavaScript code

Canonical URL: https://support.optimonk.com/en/articles/inserting-the-optimonk-javascript-code

After you have created your first campaign, it is time to put the OptiMonk JavaScript code on your website — until it is there, your popups cannot show.

If your site runs on Shopify, WordPress / WooCommerce, Magento, Bigcommerce, Unas, Gomag, Shoprenter or MerchantPro, you do not need this article: pick your platform in OptiMonk and follow the guide made for it (on Shopify there is no snippet at all — the app embed replaces it).

For a **custom website**, here is how to get the snippet and where to put it.

---

## Step 1 — Open the Domains tab

1. Log in to OptiMonk, open **Settings**, then the **Domains** tab. (The same page opens from the domain switcher in the left sidebar, with **Domain settings** or **Install snippet**.)
2. If the site is not on the list yet, click **Add domain**, type it in (*Type a new domain, e.g. example.com*) and click **Add**. Every domain is installed on its own, so if you have several sites, pick the row of the one you are working on.

---

## Step 2 — Get your snippet

1. Click the domain row to open it, then click **Connection guide**. (OptiMonk looks at your site first; if it recognises the platform it tells you so with *We recognized your platform: …* — you can still choose something else.)
2. Under **Connect your website** → *What e-commerce platform do you use?* choose **Custom website**.
3. Your unique snippet appears. Click **Copy code**; the button turns into **Copied** when it worked.

---

## Step 3 — Paste it into your site

Paste the snippet into the `<head>` section of **every page** of your website — anywhere after the opening `<head>` tag and before the closing `</head>` tag, just like a Google Analytics tag. It loads asynchronously and won't slow your site down.

**❗ You only need to include the code once per page.**

❗ Before you start, make sure you have access to the administration interface of your website. If you do not, see the next section.

---

## If you cannot edit the site yourself

At the bottom of the guide, open **Do you need help?** and choose **Send the instructions to my developer**: *We'll email them the snippet and what to do with it, so whoever looks after your-domain.com can paste it without an OptiMonk login.*

1. Fill in **Their name** (for example *Alex*) and **Their email address**.
2. **The email they'll get** shows the whole message, with the instructions and the snippet in it. *Edit it if you like — this is the whole email.*
3. Click **Send the instructions**. You get a confirmation: *Sent to alex@example.com — the snippet and the steps are on their way.* From there you can **Send it to someone else** as well.

You can send ten of these a day. If you try again straight away, OptiMonk asks you to wait a moment (*One just went out. Give it a few seconds before sending another.*); after the tenth it says *That's ten for today. Please try again tomorrow.*

The same **Do you need help?** block also links to **Read the installation guides** — *Step-by-step articles for every platform, tag manager and cache plugin.*

---

## Step 4 — Check that it is live

Once the code is on your site, click **Check now** at the bottom of the guide.

- *The OptiMonk code is live on your-domain.com.* — you are done, and the domain row switches to **Code inserted**.
- *We looked at your-domain.com and could not find the OptiMonk code yet. Make sure you saved your changes and the page is publicly reachable, then check again.*
- *An OptiMonk code is on your-domain.com, but it belongs to a different account. Replace it with the code above.*
- *We could not reach your-domain.com to check. This is on our side — try again in a moment.*

*Checking loads your site once and looks for the code — it does not need visitors.*
