# Script installation

Once your DNI script is published, it has to load on every page of your website. Pick the method that fits how you manage your site: paste the script into your HTML, use the Nimbata WordPress plugin, or add the Nimbata template in Google Tag Manager.

## Install with HTML

Use this method if you manage your site's HTML directly and don't use WordPress or Google Tag Manager.

**Before you start:**

- Complete Steps 1 to 5 of [Set up DNI step by step](https://help.nimbata.com/tracking/dni-setup#configure-your-account).
- Click **Save & Publish** before adding the script to your site.

1. **Copy your script**

   - Go to [Tracking > Tracking Code](https://app.nimbata.com/tracking/tracking-code).
   - Copy the script tag shown under **.js Tracking Code**.

   It will look like this:

   ```html
   <script type="text/javascript" src="//cdn.dni.nimbata.com/XXXXXX.min.js"></script>
   ```

   ![The script tag under .js Tracking Code on the Tracking Code page.](https://help.nimbata.com/_astro/01-image_1oezmv8.DeZOT8YQ_Z1L2cNu.webp)

2. **Paste it into your site**

   Add the script just before the `</body>` closing tag in the footer of every page on your site.

   > **Note:** Make sure the script loads after your Google Analytics script.

🎉 That's it. Place a test call to confirm it's working.

Troubleshooting: [Numbers not swapping](https://help.nimbata.com/tracking/troubleshooting#numbers-not-swapping)

## Install with WordPress

Use this method if your site runs on WordPress. The Nimbata plugin handles script placement automatically; no manual HTML editing needed.

**Before you start:**

- Complete Steps 1 to 5 of [Set up DNI step by step](https://help.nimbata.com/tracking/dni-setup#configure-your-account).
- Click **Save & Publish** before installing the plugin.

1. **Install and activate the plugin**

   In your WordPress admin:

   - Go to **Plugins > Add New**.
   - Search for **Nimbata**.
   - Install the [Nimbata Call Tracking plugin](https://wordpress.org/plugins/nimbata-call-tracking/).
   - Click **Activate**.

2. **Find your DNI ID**

   - Go to [Tracking > Tracking Code](https://app.nimbata.com/tracking/tracking-code) in Nimbata.
   - Copy the **DNI ID** (the numeric value highlighted in green in the script tag).

   ![Copy the DNI ID (the numeric value highlighted in green in the script tag).](https://help.nimbata.com/_astro/01-image_kpwwx6.BBhd6lFa_1cpYMB.webp)

3. **Enter your DNI ID in WordPress**

   In your WordPress admin:

   - Go to **Settings > Nimbata**.
   - Paste your DNI ID into the **Nimbata DNI ID(s)** field.
   - Click **Save Changes**.

🎉 The plugin will now load the script on every page. Place a test call to confirm it's working.

Troubleshooting: [Numbers not swapping](https://help.nimbata.com/tracking/troubleshooting#numbers-not-swapping)

## Install with Google Tag Manager

Use this method if your site uses Google Tag Manager (GTM). Nimbata has an official template in the Community Template Gallery, so no raw script code is needed.

**Before you start:**

- Complete Steps 1 to 5 of [Set up DNI step by step](https://help.nimbata.com/tracking/dni-setup#configure-your-account).
- Click **Save & Publish** before setting up the GTM tag.

1. **Add the Nimbata template from the Community Template Gallery**

   In your GTM workspace:

   - Click **Add New Tag**.
   - Give it a name (for example, "Nimbata").
   - Click **Choose a tag type**.
   - Select **Discover more tag types in the Community Template Gallery**.
   - Search for **Nimbata**.
   - Click **Nimbata Call Tracking**.
   - Click **Add to workspace > Add**.

2. **Enter your DNI ID**

   - Go to [Tracking > Tracking Code](https://app.nimbata.com/tracking/tracking-code) in Nimbata.
   - Copy the **DNI ID** highlighted in green in the script tag.
   - Back in GTM, paste it into the **Dynamic Number Insertion ID** field.

   ![Back in GTM, paste it into the Dynamic Number Insertion ID field.](https://help.nimbata.com/_astro/01-image_130caj3.BgC6nvKR_18TduK.webp)

3. **Set firing options and trigger**

   Under **Advanced Settings**:

   - Set **Tag firing options** to **Once per event**.
   - Create a new trigger.
   - Select **Page View - DOM Ready**.
   - Set it to fire on **All DOM Ready events**.

4. **Save and publish**

   Save the tag and submit your GTM workspace changes.

🎉 The tag will now fire on every page load. Place a test call to confirm it's working.

Troubleshooting: [Numbers not swapping](https://help.nimbata.com/tracking/troubleshooting#numbers-not-swapping)
