---
updatedAt: 2025-10-19T09:23:52.000Z
---

# Invisible Widgets

## Overview

Occasionally, you may decide *not* to display Taboola content for certain page types. Although these pages do **not** contain Taboola content, **Taboola integration** is still needed in order to track *page views*. Doing so, helps **Taboola** to optimize **user engagement** and **CTR** *across your site*.

> 📘
>
> Customers using <a href="https://www.taboola.com/newsroom" target="_blank">**Taboola Newsroom**</a> should *always* insert invisible widgets on the relevant pages.
>
> For more information, reach out to your **Taboola Account Manager**.

## Tracking page views only

### Standard page

To enable 'page view' tracking on a **standard web page** - *without* displaying **Taboola** content - do the following.

1. Insert the following script in the page `<head>`, and edit the relevant params:

```html
<script type="text/javascript">
  // *Global* command queue for the page
  window._taboola = window._taboola || [];
  
  // Pass the *page* type:
  _taboola.push({
    '<page-type>': "auto",
  });
  
  // The Taboola loader
  !(function (e, f, u, i) {
    if (!document.getElementById(i)) {
      e.async = 1;
      e.src = u;
      e.id = i;
      f.parentNode.insertBefore(e, f);
    }
  })(
    document.createElement("script"),
    document.getElementsByTagName("script")[0],
    // Fill in your Publisher ID (an alphabetic string), as provided by Taboola:
    "//cdn.taboola.com/libtrc/<publisher-id>/loader.js",
    "tb_loader_script"
  );
  if (window.performance && typeof window.performance.mark == "function") {
    window.performance.mark("tbl_ic");
  }
</script>
```

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

      <th>
        Instructions
      </th>
    </tr>
  </thead>

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

      <td>
        Fill in your Publisher ID (an *alphabetic* string), as provided by **Taboola**.  

        For example, if your Publisher ID is `'{user.publisherID}'`, then the URL should read:  

        `//cdn.taboola.com/libtrc/{user.publisherID}/loader.js`
      </td>
    </tr>
  </tbody>
</Table>

> 📘
>
> Your **Publisher ID** is a *unique, alphabetic String*, **provided by Taboola**.
>
> It *might* contain dashes - e.g. `"{user.publisherID}"` - but *not* spaces.

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

      <th>
        Instructions
      </th>

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

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

      <td>
        * \*Replace**this with the relevant page type (as provided by**Taboola\*\*) - e.g. `article`:  

        `article:'auto'`
      </td>

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

2. Insert the following code snippet in the page `<body>`:

> 🚧
>
> **Taboola Newsroom** customers should use the **second example**, *exactly as provided*.

```html Newsroom example
<div id="taboola-newsroom"></div>
<script type="text/javascript">
  // *Global* command queue for the page
  window._taboola = window._taboola || [];
  
  // Pass the invisible placement details:
  _taboola.push({
    mode: "rbox-tracking",
    container: "taboola-newsroom",
    placement: "Newsroom"
  });
</script>
```

> 📘 Params
>
> * `mode` - For an invisible placement, the mode is **always** `"rbox-tracking"`.
>
> * `container` - For **Taboola Newsroom**, the ID of the  `<div>` container should be `"taboola-newsroom"`.
>
>   > Make sure that the JS code snippet references the same ID.
>
> * `placement` - For **Taboola Newsroom**, use `"Newsroom"` as the placement name.

3. Insert the following code snippet just before the closing `<body>` tag:

```html
<script>
  // *Global* command queue for the page
  window._taboola = window._taboola || [];

  // Pass the `flush` command:
  _taboola.push({flush: true});
</script>
```

### AMP pages

To enable 'page view' tracking on an **AMP page** - *without* displaying **Taboola** content - do the following.

1. Insert the following tag at the top of the **AMP page**:

```html
<amp-analytics type="taboola" id="taboola">
  <script type="application/json">
    {
      "vars": {
        "aid": "<account-id>"
      }
    }
  </script>
</amp-analytics>
```

| Param          | Instructions                                                                    |
| :------------- | :------------------------------------------------------------------------------ |
| `<account-id>` | Fill in your Publisher ID (an *alphabetic* string), **as provided by Taboola**. |

> 📘
>
> Your **Account ID** (*aka* **Publisher ID**) is a *unique, alphabetic String*, **provided by Taboola**.
>
> It *might* contain dashes - e.g. `"{user.publisherID}"` - but *not* spaces.