---
updatedAt: 2026-07-30T11:12:12.000Z
---

# Standard (aka JS Tag)

## Introduction

This page explains how to integrate Taboola recommendations into a **standard** webpage, using the param values **provided by Taboola**.

<Callout icon="🚧" theme="warn">
  ### Prefilled tags

  If you received **prefilled** tags from **Taboola**, you can copy and paste them 'as is', instead of editing param values.
</Callout>

<Callout icon="🚧" theme="warn">
  ### New integration?

  If this is a new integration, please provide **Taboola** with a timeframe for launch, so we can plan post-launch QA.
</Callout>

## Supported browsers

<Callout icon="🚧" theme="warn">
  Taboola's **standard** integration (_aka_ **JS Tag** integration) is supported for any browser that is **fully** compatible with <a target="_blank" href="https://kangax.github.io/compat-table/es5/">**ES5** (ECMAScript 5)</a>  or higher. This includes all modern web browsers.

  **Older** browsers (such as **IE 11**) may encounter problems with **video ads**.
</Callout>

## Step I: Add the *loader* tag

1. Add the **Taboola *loader* tag** to the page `<head>`.
   > Fill in your specific **param** values, **as provided by Taboola** (or use the prefilled tag that was sent to you).

```html Loader tag
<script>
(function () {
    // ===== Fill in your values, as provided by Taboola =====
    var PUBLISHER_ID = '<publisher-id>';
    var PAGE_TYPE    = '<page-type>';
    // =======================================================

    var LOADER_URL         = '//cdn.taboola.com/libtrc/'       + PUBLISHER_ID + '/loader.js';
    var LOADER_PRIVACY_URL = '//static.tblcontent.com/libtrc/' + PUBLISHER_ID + '/loader.privacy.js';
    var SCRIPT_ID          = 'tb_loader_script';

    window._taboola = window._taboola || [];

    var pageTypePush = {};
    pageTypePush[PAGE_TYPE] = 'auto';
    _taboola.push(pageTypePush);

    var firstScript = document.getElementsByTagName('script')[0];

    function injectLoader(id, src, fallbackSrc) {
        if (document.getElementById(id)) return;
        var s = document.createElement('script');
        s.async = true;
        s.src   = src;
        s.id    = id;
        if (fallbackSrc) {
            s.onerror = function () {
                if (s.parentNode) s.parentNode.removeChild(s);
                injectLoader(SCRIPT_ID + '_fb', fallbackSrc, null);
            };
        }
        firstScript.parentNode.insertBefore(s, firstScript);
    }

    injectLoader(SCRIPT_ID, LOADER_URL, LOADER_PRIVACY_URL);

    if (window.performance && typeof window.performance.mark === 'function') {
        window.performance.mark('tbl_ic');
    }
})();
</script>
```

2. **Replace** the placeholder values at the top of the tag with the **param** values **provided by Taboola** (or use the prefilled tag that was sent to you):

**Editing instructions:**

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Placeholder
      </th>

      <th>
        Instructions
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `<publisher-id>`
      </td>

      <td>
        Fill in your Publisher ID, **as provided by Taboola**:

        `var PUBLISHER_ID = 'acme-news';`

        The CDN loader URL, privacy fallback URL, and pixel URL are all derived from this constant.
      </td>

      <td>
        Your Publisher ID is a _unique, alphabetic string_, **provided by Taboola**.

        E.g. `"acme-news"`
      </td>
    </tr>

    <tr>
      <td>
        `'auto'`
      </td>

      <td>
        To obtain an automated ID, leave this param as is:
        article:`'auto'`

        Else, insert your own, internal ID:
        article:`'123'`
      </td>

      <td>
        Specifies the ID of this page, for the given page type.
      </td>
    </tr>

    <tr>
      <td>
        `<page-type>`
      </td>

      <td>
        **Replace** with the relevant page type, **as provided by Taboola**:

        `var PAGE_TYPE = 'article';`
      </td>

      <td>
        Possible values: `video`, `article`, `photo`, `search`, `category`, `home`.
      </td>
    </tr>
  </tbody>
</Table>

<Callout icon="📘" theme="info">
  ### loader.js

  **loader.js** initiates communication with **Taboola** and contains _publisher-specific_ resources and configurations for your integration. This tag also includes automatic **private traffic** support: it automatically falls back to a **non-tracker** loader that sets no cross-site cookies and runs no fingerprinting scripts.
</Callout>

## Step II: Add the *placement* tags

<Callout icon="👍" theme="okay">
  ### Best practice

  For a **below-article** placement, insert the **tag** in a _separate_ container to the main article (see below).
</Callout>

```html Below-article placement in a separate container
<article>
  ...
</article>

<!-- Below-article placement goes here: -->
<div id="taboola-below-article-thumbnails"></div>
```

For **each placement** on a given page:

1. Add a ***placement* tag** to the `<body>`, in the location that the placement should display.
   > Each placement has both a `<div>` tag and `<script>` tag, as shown below.
2. Edit the tag (or use the prefilled tag that was sent to you):
   1. **Choose** an ID for the `<div>` container - e.g. `"taboola-below-article-thumbnails"`.
   2. Fill in the `<script>` param values, **as provided by Taboola**.

```html Placement tag
<!-- *Choose* an ID: -->
<div id="taboola-below-article-thumbnails"></div>
<!-- Fill in *your* param values, as provided by Taboola: -->
<script>
  // *Global* command queue for the page
  window._taboola = window._taboola || [];
  
  _taboola.push({
    mode: '<mode>',
    container: '<container>', /* The ID of the <div> container (e.g. 'taboola-below-article-thumbnails') */
    placement: '<placement>',
    target_type: '<target_type>'
  });
</script>
```

<Callout icon="📘" theme="info">
  ### Params

  > These are **sample** values only. Make sure to fill in **your own** values, **as provided by Taboola**.

  - `mode` - The <Glossary>UI Mode ID</Glossary> for this placement, **as provided by Taboola**:
    - E.g. `'thumbnails-a'`.
  - `container` - The ID of the `<div>` container for this placement's content:
    - E.g. `'taboola-below-article-thumbnails'`.
  - `placement` - The <Glossary>placement name</Glossary>, **as provided by Taboola**:
    - E.g. `'Below Article Thumbnails'`.
  - `target_type` - The target type, **as provided by Taboola**:
    - E.g. `'mix'`.
</Callout>

<Callout icon="🚧" theme="warn">
  ### Guidelines

  1. Each placement must have its own JS tag.
  2. On a given page, each JS tag must have **unique** values for `container` and `placement`. Do **not** duplicate a JS tag on the same page. (For _special use cases_, see [below](https://developers.taboola.com/web-integrations/docs/js-tag#auto-generating-placement-names).)
  3. The value for `container` must match the ID of the `<div>` container for the placement.
</Callout>

<Callout icon="📘" theme="info">
  ### Custom Segments

  To **target** a custom segment - or simply **track its performance** - you can **optionally** pass a `cseg` param.

  For more information, see [Custom Segments](https://developers.taboola.com/web-integrations/docs/custom-segments) - or reach out to your **Taboola Account Manager**.

  ***

  This flow typically requires **custom development**.
</Callout>

## Step III: Add the *flush* tag

1. Add the **Taboola *flush* tag** to the page `<body>`, *immediately after the last placement tag*:

```html Flush tag
<script>
  // A global queue for all Taboola commands on the page
  window._taboola = window._taboola || [];
  
  _taboola.push({flush: true});
</script>
```

<Callout icon="🚧" theme="warn">
  ### Guidelines

  - The `flush` flag instructs **Taboola** to fetch recommendations (and not wait for additional data).
  - Pass the `flush` flag **once** only - **after** passing all placements for that page.
  - If you have unique requirements, reach out to **Taboola** to discuss alternative flows.
</Callout>

<Callout icon="👍" theme="okay">
  ### Need a hand?

  Feel free to reach out on our [Community Discussion](https://developers.taboola.com/web-integrations/discuss) page!
</Callout>

## Special use cases

### Generating placement names

*Occasionally*, you may want to generate your own placement names - e.g. to re-use a placement for backfill.

In that case, make sure to follow the guidelines below.

<Callout icon="🚧" theme="warn">
  ### Guidelines

  1. On a given page, each JS tag must have **unique** values for `container` and `placement`.
  2. **Placement names** are used for **reporting**, and **should be kept meaningful**:
     1. Consider appending an integer to the original placement name - e.g. `'Below Article Thumbnails 1'`, `'Below Article Thumbnails 2'`, etc.
     2. **Avoid** using a **randomly generated string** or **numeric ID** as a placement name.
     3. Keep the total number of placement names to **100 or less**, for a given account.

  ***

  For more information, or specific requests, reach out to your **Taboola Account Manager**.
</Callout>

## What's Next?

1. In order to provide *personalized* recommendations for impressions in the *EU* and *California*, make sure to implement [GDPR and CCPA](https://developers.taboola.com/web-integrations/docs/gdpr-and-ccpa) respectively.
2. If you have not already done so, configure [ads.txt](https://developers.taboola.com/web-integrations/docs/ads-txt).
3. Contact **Taboola** so that we can verify your implementation.

<br />