# Install OptiMonk on Gomag through the theme's CSS/JS Editor

Canonical URL: https://support.optimonk.com/en/articles/install-optimonk-on-gomag

On Gomag the OptiMonk code goes into the JavaScript block of your active theme. The OptiMonk guide gives you the code to copy and, if it is available for your account, a field for your Gomag API token for product recommendations.

---

## How do I open the Gomag guide in OptiMonk?

1. In OptiMonk, open **Settings**, then the **Domains** tab.
2. Click the row of your Gomag domain, then **Connection guide**.
3. Under *What e-commerce platform do you use?* choose **Gomag**.

---

## Step 1: Copy the OptiMonk code

The guide says *This JavaScript goes into your Gomag theme. Copy it:* Click **Copy code**.

---

## Step 2: Add the code to your Gomag theme

1. In a new tab, log in to your Gomag admin and open the **Design** page.
2. Open the **CSS/JS Editor** of your active theme.
3. Paste the code into the **JavaScript** block and save.

---

## Step 3 (optional): Connect your product catalog

This step is optional: it is needed for product recommendation campaigns. The code works without it. The guide only shows this step if connecting the product catalog is available for your account.

1. In your Gomag admin, open **Settings > API**.
2. If you have no token yet, click **Generate an API token** in the top left corner.
3. Name it, grant **Products**, **Categories** and **Orders**, then click **Generate** in the top right corner.
4. Paste the token into the **API key** field of the OptiMonk guide and click **Save**.

When it works, the guide says *Connected — we can keep your product catalog in sync.* If it says *Invalid API key*, copy the token again from Gomag and check the three permissions. To disconnect the catalog, click **Revoke**.

---

## How do I check that it works?

Click **Check now** in the bar at the bottom of the guide.

- *It works! OptiMonk is on your site.* Your campaigns can now show in your store.
- *Just waiting for one visitor to confirm it.* Open your store yourself in a new tab; as soon as it loads, the guide updates. If it keeps waiting, check that you saved the JavaScript block of your active theme.

---

## Can someone else do it for me?

Click **Need Help?** at the bottom of the guide. You can hand the steps to an AI assistant with **Ask Claude** or **Ask ChatGPT**, or choose **Email it to my developer** to send the code and the steps to whoever manages your store.
