---
title: Inventory script integration (Site)
description: This article is reviewing inventory script integration for sites.
---

[Skip to content](https://help.gamoshi.com/knowledge/inventory-script-integration-site#main-content)

English

Show submenu for translations

[More support](https://help.gamoshi.com/knowledge/kb-tickets/new?hsLang=en)

[![gamoshi logo din-4](https://help.gamoshi.com/hs-fs/hubfs/gamoshi%20logo%20din-4.png?width=300&height=53&name=gamoshi%20logo%20din-4.png)](https://gamoshi.com)

- [Tickets](https://support.gamoshi.com/tickets-view)
- [Sign out](https://support.gamoshi.com/_hcms/mem/logout)

Open main navigation

Close main navigation

- [Tickets](https://support.gamoshi.com/tickets-view)
- [Sign out](https://support.gamoshi.com/_hcms/mem/logout)
- English
  
  Show submenu for translations
- [More support](https://help.gamoshi.com/knowledge/kb-tickets/new)
- [Gamoshi.com](https://www.gamoshi.com/)

[Gamoshi.com](https://www.gamoshi.com/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://help.gamoshi.com/knowledge?hsLang=en)
2. [General How To](https://help.gamoshi.com/knowledge/general-how-to?hsLang=en)

# Inventory script integration (Site)

## This article is reviewing inventory script integration for sites.

### Overview

Script integration connects website inventory to your account using JavaScript implementation. This method is ideal for publishers who implement ads directly on their web pages or through ad servers.

---

### Step-by-Step Setup

#### **Step 1: Create New Inventory**

1. Go to **Inventory Module** → **List** tab
2. Click **'+'** button to create new inventory

---

#### **Step 2: Configure General Settings**

1. **Source:** Select **Site**
2. **Fill required fields:** 
     - Inventory name
     - Associated business partner (optional)
     - Max QPS and incoming request limits (optional)
3. **Integration Type:** Select **'Script'**
4. Click **'Create'**

---

#### **Step 3: Access Script Wizard**

Navigate to the **Integration** tab to access the script generation wizard.

**Quick Access:** Click integration type in 'Type' column from Inventory List for instant pop-up with script.

![Screen Shot 2023-05-15 at 11.15.59](https://help.gamoshi.com/hs-fs/hubfs/Screen%20Shot%202023-05-15%20at%2011.15.59.png?width=670&height=376&name=Screen%20Shot%202023-05-15%20at%2011.15.59.png)

 

#### **Script Configuration Wizard**

#### 1. Select Media Type

Choose the ad format your inventory will serve:

- **Banner:** Standard display ads
- **Video:** Video ad placements
- **Native:** Native advertising format

#### 2. Configure Macros

**Default macros** are pre-selected for optimal script performance.

**Macro management:**

- Add additional macros using the macros select box
- Remove unnecessary macros if needed
- **Recommendation:** Keep default macros for best effectiveness

#### 3. Copy Generated Script

Click **'Copy'** icon to copy the generated JavaScript code

#### 4. Add Placement ID (Required)

**Locate this section in the script:**

/\*To implement the next section remove the comment sign and replace it with your placement ID:\*/  
/\*"placement": "PLACE YOUR PLACEMENT ID HERE",\*/ 

 

**Update to:**

 "placement": "your-actual-placement-id",

 

**Important:** Remove the `/*` and `*/` comment marks and replace the placeholder with the actual placement ID.

 

#### 5. Add Passback (Optional)

If using ad server passback, locate this section:

/\*To implement the passback remove the comment sign and replace it with your passback code:\*/  
/\*"passback": "Example: \<div\> PASSBACK ADVERTISEMENT \</div\>"\*/

**Update to:**

"passback": "\<div\>YOUR ACTUAL PASSBACK CODE HERE\</div\>"

**Steps:**

1. Remove comment marks (`/*` and `*/`)
2. Replace example code with your actual passback implementation
3. Ensure the passback code is properly escaped for JavaScript

 

---

### Implementation Steps for Publisher

#### **Basic Implementation:**

1. Copy the generated script from the Integration tab
2. Add placement ID to script
3. Add passback code if needed
4. Implement the script on the website where the ads should appear
5. Test ad serving and passback functionality

#### **Ad Server Implementation:**

1. Configure script in ad server (DFP, GAM, etc.)
2. Replace macros with ad server macro equivalents
3. Test passback chain functions correctly

#### **Script Example Structure**

```
<script type="application/javascript">window.$gambid = {  "rtb": "https://rtb.gamoshi.io/r/[INVENTORY_ID]/bidr",  "bidParams": {    "adtype": "banner",    "adh": 250,    "adw": 300,    "bidfloor": 0.01,    "placement": "your-placement-id"  // Add your placement ID  },  // Optional passback implementation  "passback": "<div>PASSBACK CODE</div>"};</script><script type="text/javascript" src="https://static.gambid.io/tag/latest"></script>
```

 

---

### Best Practices

#### **Script Configuration:**

- Always include the placement ID for proper tracking
- Keep default macros unless you have specific requirements
- Test the script thoroughly before deploying to production
- Document any custom macro configurations

#### **Passback Implementation:**

- Only add the passback code if you're using an ad server fallback
- Ensure the passback code is properly formatted
- Test passback chain triggers correctly when no fill
- Verify passback doesn't create infinite loops

#### **Testing:**

1. Implement the script on the test page first
2. Verify that ads load and display correctly
3. Test passback functionality (if implemented)
4. Monitor the browser console for JavaScript errors
5. Check the Analytics Module for traffic flow

---

### Troubleshooting

**Script not loading:**

- Check the JavaScript console for errors
- Verify the script URL is correct and accessible
- Ensure no ad blockers are interfering with the script

**Ads not appearing:**

- Confirm the placement ID is added correctly
- Check campaigns are targeting this inventory
- Verify bid floors aren't set too high
- Review the browser console for bidding errors

**Passback not working:**

- Verify comment marks are removed
- Check the passback code syntax is valid
- Ensure passback doesn't contain conflicting scripts
- Test passback independently

**Macro issues:**

- Confirm all required macros are included
- Verify macro values are being populated
- Check ad server macros match script requirements

#### Advanced Configuration

---

### Multiple Placements:

Create duplicate scripts with different placement IDs for each ad position on your site.

---

### Custom Macros:

Add platform-specific macros for enhanced targeting and tracking capabilities.

---

### Dynamic Parameters:

Use JavaScript variables to populate bid parameters dynamically based on page context.

- [FAQ](https://help.gamoshi.com/knowledge/faq?hsLang=en)
- [General Information](https://help.gamoshi.com/knowledge/general-information?hsLang=en)
- [Programmatic Exchange Enterprise Modules](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#main-content)

    - [Analytics](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#analytics)
    - [Users](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#users)
    - [Business partners](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#business-partners)
    - [Advertisers](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#advertisers)
    - [Inventory](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#inventory)
    - [Audience](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#audience)
    - [Targeting](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-modules?hsLang=en#targeting)
- [Programmatic Exchange Enterprise How To](https://help.gamoshi.com/knowledge/programmatic-exchange-enterprise-how-to?hsLang=en)
- [General How To](https://help.gamoshi.com/knowledge/general-how-to?hsLang=en)
- [Programmatic Exchange Pro Account](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#main-content)

    - [Analytics](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#analytics)
    - [Users](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#users)
    - [Business partners](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#business-partners)
    - [Advertisers](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#advertisers)
    - [Inventory](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#inventory)
    - [How To (Pro account)](https://help.gamoshi.com/knowledge/programmatic-exchange-pro-account?hsLang=en#how-to-pro-account)
- [DSP account](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#main-content)

    - [Analytics](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#analytics)
    - [Users](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#users)
    - [Business Partners](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#business-partners)
    - [Advertisers](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#advertisers)
    - [Inventory](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#inventory)
    - [Audience](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#audience)
    - [Targeting](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#targeting)
    - [DSP How to](https://help.gamoshi.com/knowledge/dsp-account?hsLang=en#dsp-how-to)

[![Chill listening crop-3](https://help.gamoshi.com/hs-fs/hubfs/gamoshi%20logo%20din-2.png?width=136&height=24&name=gamoshi%20logo%20din-2.png "Chill listening crop-3")](http://gamoshi.com)

Gamoshi Help Center

Copyright © 2026, Gamoshi LTD.