# Setup



# The inventory's structure

A **publisher** distributes content through one or more media platforms. Online advertising is often the business model of choice to benefit financially from these platforms. A publisher reserves a certain amount of space for advertising purposes: the **inventory***.* A publisher is free to choose how it organises and structures its inventory. Adhese supports the client as a strategic partner during this phase of the implementation process.

Each piece of a publisher’s inventory is a **position**. A position is a combination of a **location** (i.e. a section within a publication) and a **format**. The following diagram is a simplified representation of an inventory’s structure.

[![the_inventorys_structure_positions1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/HpFV1SzWZTrBbJBk-the-inventorys-structure-positions1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/HpFV1SzWZTrBbJBk-the-inventorys-structure-positions1.png)

See [Positions](https://documentation.adhese.org/books/inventory-setup/page/positions) for a diagram that includes concrete examples of publishers, publications, locations and formats.

### The structure of a position

#### Publication

A publisher maintains online **publications** such as a website, blog, video channel, newsletter, smartphone app, or webshop. Adhese is platform-agnostic and able to support all online publications.

#### Location

A **location** is a (sub)section within a publication, for example, the home page.

#### Format

A **format** defines the conditions, such as the file size and dimensions, that a creative must meet to avoid errors while uploading the creative file. A format is not limited to online banner ads. It can also be a native ad or a video ad.

There are two types of formats: **main** and **sub formats**. The ad tag for the main format can also fetch the defined sub-formats of its main format. Sub formats appear in the same position as their main format. However, sub formats can have different dimensions. [Create a format](https://documentation.adhese.org/books/inventory-setup/page/formats) elaborates on how to distinguish between main and sub formats.

Refer to the Appendix [Online advertising formats](https://documentation.adhese.org/books/integrations-and-delivery/page/online-advertising-formats) to define the most important formats and their representation within their environment. The overview is not exhaustive. A publisher can also implement custom formats.

### Channels

[Channels](https://documentation.adhese.org/books/inventory-management/page/channels) are a collection of positions within a publication (e.g. run-of-site) or across your network of publications (e.g. run-of-network). **Channels** group identical formats across different locations, making it easy to target ads on similar web pages.

# Publishers

A **publisher** distributes content across one or more media platforms. Within a company, multiple publishers or sub-publishers can exist.

You can filter the *Publishers* screen by publisher status using the **Filter** drop-down menu. Determine the number of results to display from the **Number of results** drop-down.

# Create a new publisher

To create a new publisher:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Publishers* to open the *Publishers* screen.
    
    [![Schermafdruk van 2024-10-18 14-43-49.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/53m3tMlybMjf1Cz3-schermafdruk-van-2024-10-18-14-43-49.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/53m3tMlybMjf1Cz3-schermafdruk-van-2024-10-18-14-43-49.png)
3. In the overview of publishers, click the *Create a new publisher* button. This opens the *Create a new publisher* screen, where you define the details for the new publisher.
    
    [![Schermafdruk van 2024-10-18 14-48-11.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/bJBCoo2wTbXEeOhK-schermafdruk-van-2024-10-18-14-48-11.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/bJBCoo2wTbXEeOhK-schermafdruk-van-2024-10-18-14-48-11.png)
4. (Optional) Select an existing publisher from the **Part of** drop-down list if the new publisher is a sub-publisher of a current publisher.
5. Enter the name of the publisher in the **Company name** field. This is the only mandatory field. The name of the publisher is needed to categorise the publications you want to create in the next step.
6. All other fields under the *Company Information* header are optional. However, these input fields can be of importance as the client reports publish this data. 
    - (Optional) Enter a short name for the publisher in the **Quote** field.
        
        <p class="callout info">It is necessary to enter a quote for the publisher to make sure an XML order upload succeeds. The quote should be used in the &lt;company&gt; field.</p>
    - (Optional) Enter the address for the publisher in the **Street**, **Number**, **Postal Code**, **City**, and **Country** fields.
    - (Optional) Enter means of contact for the publisher in the **Phone**, **Fax**, **Website**, and **Email** fields.
    - (Optional) Enter a bank account number in the **Bank Account** field.
    - (Optional) Enter a VAT number in the **VAT** field.
    - Tick the **Active?** checkbox to declare that the status of the publisher is active. 
7. All fields under the *Contact* header are optional. However, data entered here can be of importance as the reports publish it.
    - (Optional) Enter the name of the publisher’s contact person in the **First name** and **Last name** fields.
    - (Optional) Enter the address of the publisher's contact person in the **Street**, **Number**, **Postal** **Code**, **City**, and **Country** fields.
    - (Optional) Enter a means of contact for the publisher's contact person in the **Phone**, **Fax**, **Website**, and **Email** fields.
8. Click the *Save* button at the bottom of the *Create a new publisher* form to save your new publisher.

# Edit a publisher

To edit a publisher:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Publishers*.
3. In the list of publishers, click the publisher's name you want to modify or click the edit icon [![deactivate_a_publisher1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/ELSRpIaUKkqb8tMG-deactivate-a-publisher1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/ELSRpIaUKkqb8tMG-deactivate-a-publisher1.png). This opens the *Edit publisher* screen.  
    [![Schermafdruk van 2024-10-18 14-49-58.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/jcuvAvFmCNQux8JT-schermafdruk-van-2024-10-18-14-49-58.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/jcuvAvFmCNQux8JT-schermafdruk-van-2024-10-18-14-49-58.png)
4. Change any of the publisher’s details.
5. Click *Save*.

# Deactivate a publisher

To deactivate a publisher:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Publishers*.
3. In the list of publishers, click the publisher's name or the edit icon [![deactivate_a_publisher1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/aUHDpmE90hebytHR-deactivate-a-publisher1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/aUHDpmE90hebytHR-deactivate-a-publisher1.png) for the publisher you want to deactivate. This opens the Edit a publisher screen.
4. Deselect the radio button in the **Active?** field to deactivate the publisher.
5. Click *Save*.

An inactive publisher will be grey (instead of yellow) in the list of publishers.

# Publications

A publisher maintains online **publications** such as a website, blog, video channel, newsletter, smartphone app, or webshop. Adhese is platform-agnostic: it can support any type of publication.

You can filter the *Publications* screen by publisher and select a publisher from the **Show only** drop-down menu above the list. You can filter the *Publications* screen by publication status using the **Filter** drop-down menu. Determine the number of results to display from the **Number of results** drop-down. Use the *search* bar to search for a specific publication.

# Create a new publication

To add a new publication:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Publications*. The *Publications* screen opens:  
    [![Schermafdruk van 2024-10-18 14-58-37.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/8ryYdNJC5cB9B3bZ-schermafdruk-van-2024-10-18-14-58-37.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/8ryYdNJC5cB9B3bZ-schermafdruk-van-2024-10-18-14-58-37.png)
3. Click the *Create a new publication* button. This opens the *Create New Publication* screen, where you enter the new publication details.  
    [![Schermafdruk van 2024-10-18 14-59-09.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/wqAhHRuCTgBJUJJJ-schermafdruk-van-2024-10-18-14-59-09.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/wqAhHRuCTgBJUJJJ-schermafdruk-van-2024-10-18-14-59-09.png)
4. In the **Publisher** drop-down, select the publisher to which the publication belongs.
5. Select *yes* or *no* to determine whether the status of the publication is active or not in the **Active?** drop-down. By default, a new publication is active. If a publication is set to inactive, you will not be able to use it to serve ads.
6. Enter a name for the publication in the **Name** field.
7. (Optional) Enter a short name for the publication in the **Quote** field. Adhese uses the quote as a short notation for the publication and displays it in the list of locations (see [Create a new location](https://documentation.adhese.org/books/inventory-setup/page/locations#bkmrk-create-a-new-locatio)).
8. (Optional) Enter the publisher’s contact details in the **Street**, **Number**, **Postal code**, **City**, **Country**, **Phone**, and **Fax** field
9. To preview uploaded creatives in Adhese, provide the URL of the publication's website in the **Website** field.
10. Click the *Save* button at the bottom of the form to save your new publication.

<p class="callout warning">Make sure to use a full URL (e.g. https://example.com) instead of a short URL (e.g. example.com)</p>

# Edit a publication

To edit a publication:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Publications*.
3. In the list of publications, click the name or the edit icon [![deactivate_a_publisher1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/0oasbva32UbrG3zS-deactivate-a-publisher1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/0oasbva32UbrG3zS-deactivate-a-publisher1.png) for the publication you want to edit. This opens the *Edit publication* screen.  
    [![Schermafdruk van 2024-10-18 15-00-41.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/fXSq4CjTp9hV1K3D-schermafdruk-van-2024-10-18-15-00-41.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/fXSq4CjTp9hV1K3D-schermafdruk-van-2024-10-18-15-00-41.png)
4. Change any of the publication’s details.
5. Click *Save*.

# Deactivate a publication

To deactivate a publication:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Publications*.
3. In the list of publications, click the name of the publication or click the edit icon [![deactivate_a_publisher1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/J9AnPXGXzkkIjUtX-deactivate-a-publisher1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/J9AnPXGXzkkIjUtX-deactivate-a-publisher1.png) for the publication you want to deactivate. This opens the Edit a publication screen.
4. Change the **Active** field from *yes* to *no*.
5. Click *Save*.

The publication and its positions are no longer available in the *Booking* header. An inactive publication will be grey (instead of yellow) in the list of publishers.

[![Schermafdruk van 2024-10-18 15-02-44.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/dWT2qabJLhNZ9UA6-schermafdruk-van-2024-10-18-15-02-44.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/dWT2qabJLhNZ9UA6-schermafdruk-van-2024-10-18-15-02-44.png)

<p class="callout danger">Deactivating a publication prevents new bookings from being created for it. Running bookings, including bookings where the publication is part of a channel, remain active. The owner of the deactivated publication is responsible for removing all requests to Adhese.   
To prevent running bookings from delivering on deactivated publications, create a 100% SOV booking coupled with an empty ad on the highest priority. Check that this booking has priority over all other bookings in the competing bookings list and/or the planned daily traffic graph.  
</p>

# Locations

A **location** is a (sub)section within a publication, such as a home page, the local news or lifestyle section, or the daily newsletter.

# Create a new location

To create a new location:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Locations*. The *Locations* screen opens:
3. The *Locations* screen consists of a table with four columns:
    
    
    1. The *N<sup>o</sup>* column displays the ID of the location.
    2. The *Location* column shows the name of the publication and the location.
    3. The *Active and future bookings* column indicates the number of bookings that are currently booked on that location.
    4. The last column details whether the location is a single position or if the location belongs to a [channel](https://documentation.adhese.org/books/inventory-management/page/channels) of positions.
    
    To filter locations belonging to a specific publication, select a publication from the **Show only** drop-down menu above the list and click the magnifying glass icon
    
    [![Schermafdruk van 2024-10-18 15-28-58.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/AoD5uondALq4gtO1-schermafdruk-van-2024-10-18-15-28-58.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/AoD5uondALq4gtO1-schermafdruk-van-2024-10-18-15-28-58.png)
4. Click the *Create a new location* button. This opens the *Create a new location* screen.  
    [![Schermafdruk van 2024-10-18 15-29-41.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/yM0LMMGF4OALBDBw-schermafdruk-van-2024-10-18-15-29-41.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/yM0LMMGF4OALBDBw-schermafdruk-van-2024-10-18-15-29-41.png)
5. In the **Publication** drop-down, select the publication to which the location belongs.
6. Enter the name of the location in the **Name** field. Choose a clear and logical name, such as *magazine home*.
7. Define the URL for the location in the **URL** field. The URL should follow the scheme agreed upon during the setup process. Please note that each location must have a unique URL, and no two locations can share the same URL. Multiple URLs can be defined for a location by separating them with a semicolon (;).
    
    <p class="callout info">To verify whether a location URL already exists, navigate to the *Admin* screen and select *Positions*. Type the URL in the search bar and click the magnifying glass icon. If the URL is already in use, it will be listed on the results page. In some cases, the results page does not display the URL of an existing location. This may be because the URL belongs to an inactive publication. To examine this, click on the *Download all positions as spreadsheet* button. Open the spreadsheet and check whether the URL belongs to an inactive publication.</p>
    
    <p class="callout info">If the location refers to a channel, the URL will have no effect. Therefore, we recommend ignoring this property when dealing with channels.</p>
8. (Optional) In the **Code** field, enter the location code or foreign key if Adhese integrates with your existing CMS.
9. Determine whether the location is a standard location or a channel location by choosing a group level from the **Channel** drop-down menu:
    
    
    - If the location is a separate location, select *group level 0*.
    - If the location is a channel, select *group level 1* or higher.
10. Click the save button.

<p class="callout info">The **group level** sets the priority of a channel and is determined within the database. Here is an example to illustrate the idea. Take the following two channels: *Newspaper \[News\] Sports Football Run Of* and *Newspaper \[News\] Sports Run Of.* Note that the *Sports* channel contains all sports positions, including the football positions of the *Sports Football* channel. The *Sports Football* channel has a higher priority (and, therefore, a lower group level) than the *Sports* channel because the *Sports Football* channel only contains the *Football* positions.</p>

# Edit a location

To edit a location:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Locations*.
3. In the list of locations, click the name of the location you want to modify or click the edit icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/zQxKceXDreQdwfQ0-afbeelding.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/zQxKceXDreQdwfQ0-afbeelding.png). The *Edit location* screen opens:  
    [![Schermafdruk van 2024-10-18 15-49-11.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/YzRwqASHJqOjSQ2j-schermafdruk-van-2024-10-18-15-49-11.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/YzRwqASHJqOjSQ2j-schermafdruk-van-2024-10-18-15-49-11.png)
4. Change any of the location’s details.
5. Click *Save*.

# Formats

A **format** specifies the requirements, such as file size and dimensions, that a creative must meet to prevent errors when uploading the creative file. A format does not have to be limited to online banner ads; it can also be a native ad or a video ad. All formats are acceptable as long as they fit within your inventory structure, website design and strategy.

Refer to the Appendix [Online advertising formats](https://documentation.adhese.org/books/integrations-and-delivery/page/online-advertising-formats) for a definition of the most important formats and a representation within their environment. The overview is not exhaustive. A publisher can implement custom formats as well.

# Create a format

The *Formats* screen consists of a table with three columns:

1. The *N*<sup>*o* </sup>column displays the ID of the format.
2. The *Format* column shows the name of the format and its dimensions.
3. The *Template file* column shows the template file that belongs to the format.

To create a new format:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Formats*. The *Formats* screen opens:  
    [![Schermafdruk van 2024-10-21 13-51-38.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/p1f2jCYAaOnf4gSq-schermafdruk-van-2024-10-21-13-51-38.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/p1f2jCYAaOnf4gSq-schermafdruk-van-2024-10-21-13-51-38.png)
3. Click the *Create a format* button. This opens the *Create a new format* screen.  
    [![Schermafdruk van 2024-10-21 14-30-18.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/VcLodriDWdcp8RIi-schermafdruk-van-2024-10-21-14-30-18.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/VcLodriDWdcp8RIi-schermafdruk-van-2024-10-21-14-30-18.png)
4. Enter a name in the **Name** field. Choose a clear and logical name, such as Leaderboard or Interstitial.
5. Determine whether the format is part of a stack from the **Part-of** drop-down.
    
    <p class="callout info">A Stack format sends a list of ads that are available for display for that position. A stack is always a client-specific implementation.</p>
6. (Optional) Select a JavaScript template file in the **Template file** drop-down. Refer to [Templates](https://documentation.adhese.org/books/adhese-ui/page/the-administration-screen#bkmrk-formats-and-template) for more information about template files.
7. If you choose to deliver multiple campaign bookings simultaneously (see [Delivery multiples](https://documentation.adhese.org/books/campaign-management/page/bookings#bkmrk-combination-or-deliv)), you will need to specify the order of the formats on the web page. In the **Trigger Order** field, enter a number that indicates the position of the format within the sequence of formats.
8. Enter the dimensions of the format in pixels in the **Width** and **Height** fields.
    
    <p class="callout info">You can configure a format to contain up to six images.</p>
9. Enter the maximum file size of the format in kiloBytes in the **Max size (kB)** fields.
10. Skip the next property (Add URL?) as it is of no significance anymore.
11. In the **Tag** drop-down:
    
    
    - Select *yes* if the format is the main format.
        
        <p class="callout danger">Do not forget to enter a code tag in the **Code tag** field (step 19), as a new tag is necessary for the main format.</p>
    - Select *no* if the format is a subformat.
        
        <p class="callout danger">Do not forget to refer to the main format in the **Code book** field (step 17).</p>
12. **Open creative previews in a new tab?** The default setting is *no*. When set to yes, the preview of a creative is shown in a new tab.
13. Select *yes* or *no* from the **Has completion rate events** drop-down to activate video reporting for the new format.
14. <p class="callout warning">The transcodable option is currently not supported. Leave it on *no*.</p>
15. If the format will be used in [Digital Out of Home (DOOH)](https://documentation.adhese.org/books/integration-setup/page/dooh-endpoints) positions, assets can be pre-loaded and cached by selecting *yes* in **Use in headsup file** (if the headsup endpoint is configured).
16. (Optional) Specify the foreign key of the format in the **Code Import** field to link Adhese to an existing external CMS.
17. Enter the name of the tag variable in the **Code book** field. If the format is a subformat, enter the tag code of the main banner. (Optional)
18. The Code MDB field is deprecated
19. Enter the name of the tag variable in the **Code tag** field. The code tags themselves are usually defined in the setup stage.
    
    <p class="callout info">A code tag is only required if the format is the main format (step 11). For example, if your main format runs on the BANNER tag, the tag code is BANNER.</p>
20. (Optional) Provide a key in the **Code export** field to establish a link with an external database.
    
    The following table gives a few examples of completing the *Code tag* and *Code book* input fields for main and sub formats.

<table border="1" id="bkmrk-format-name-format-t" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0323%;"></col><col style="width: 25.0323%;"></col><col style="width: 25.0323%;"></col><col style="width: 25.0323%;"></col></colgroup><tbody><tr><td align="center" data-sheets-value="{ " height="32">**Format name**</td><td align="center" data-sheets-value="{ ">**Format type**</td><td align="center" data-sheets-value="{ ">**Code tag**</td><td align="center" data-sheets-value="{ ">**Code book**</td></tr><tr><td align="left" data-sheets-value="{ " height="17">Leaderboard</td><td align="left" data-sheets-value="{ ">Main format</td><td align="left" data-sheets-value="{ ">leaderboard</td><td align="left" data-sheets-value="{ ">leaderboard</td></tr><tr><td align="left" data-sheets-value="{ " height="62">Homepage takeover (leaderboard + wallpaper)</td><td align="left" data-sheets-value="{ ">Sub format</td><td align="left" data-sheets-value="{ "> </td><td align="left" data-sheets-value="{ ">leaderboard</td></tr><tr><td align="left" data-sheets-value="{ " height="32">Medium rectangle</td><td align="left" data-sheets-value="{ ">Main format</td><td align="left" data-sheets-value="{ ">rectangle</td><td align="left" data-sheets-value="{ ">rectangle</td></tr><tr><td align="left" data-sheets-value="{ " height="32">Large rectangle</td><td align="left" data-sheets-value="{ ">Sub format</td><td align="left" data-sheets-value="{ "> </td><td align="left" data-sheets-value="{ ">rectangle</td></tr></tbody></table>

21. Specify the **Type** of the format, such as a third-party URL or image, video, animated GIF, or text ad. As a format can take many forms, you can select more than one type.
22. (Optional) Enter a comment in the **Comment** field.
23. Click the *Save* button beneath the form to save your new format.

<p class="callout danger">You must save the main format again after creating a new subformat. For all existing main format positions, subformat positions will also be available on the booking screen.</p>

# Edit a format

To edit a format:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Formats*.
3. In the list of formats, click the format's name or click the edit icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/bVIyxmJCeT34tq7o-afbeelding.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/bVIyxmJCeT34tq7o-afbeelding.png) for the format you want to edit. The *Edit template* screen opens:  
    [![Schermafdruk van 2024-10-22 10-26-12.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/qedNbVz4tAkUWHQm-schermafdruk-van-2024-10-22-10-26-12.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/qedNbVz4tAkUWHQm-schermafdruk-van-2024-10-22-10-26-12.png)
4. Change any of the format’s details.
5. Click *Save*.

# Stacked format

A *Stack* format sends a list of ads available to display for that position. The client (browser) decides which ad(s) to display. An example of a stacked format is a text link ad.

To create a stacked format, add a new format:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Formats*. The *Formats* screen opens:  
    [![Schermafdruk van 2024-10-21 13-51-38.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/nei7BiRgT8yMuXop-schermafdruk-van-2024-10-21-13-51-38.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/nei7BiRgT8yMuXop-schermafdruk-van-2024-10-21-13-51-38.png)
3. Click the *Create a format* button. The *Create a new format* screen opens:  
    [![Schermafdruk van 2024-10-21 14-45-42.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/Gc6ShFAxvKgNSXnw-schermafdruk-van-2024-10-21-14-45-42.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/Gc6ShFAxvKgNSXnw-schermafdruk-van-2024-10-21-14-45-42.png)
4. Define the following properties that are necessary for the correct implementation of a stacked format: 
    1. From the **Part-of** drop-down, select *Stack* to define the format as a stack format.
    2. Select the correct JSON template from the **Template file** drop-down. Do not select a template if you plan to use an [Advar template](https://documentation.adhese.org/books/inventory-setup/page/templates#bkmrk-advar-templates) to return a JSON object.
    3. Indicate the **Type** of the format, such as a third-party URL or image, video, animated GIF, or text ad.
5. Click the *Save* button beneath the form to save your new format.

# Positions

All necessary elements of a position, namely the [publication](https://documentation.adhese.org/books/inventory-setup/page/publications), [location](https://documentation.adhese.org/books/inventory-setup/page/locations) and [format](https://documentation.adhese.org/books/inventory-setup/page/formats), are available now. In the simplified diagram of the inventory’s structure, we have inserted a subset of the newly created publications, locations and formats:

[![positions1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/q3TkNd7locZo6sx5-positions1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/q3TkNd7locZo6sx5-positions1.png)

# Create a position

The *Positions* screen consists of a table with nine columns:

1. The *#* column displays the ID of the location.
2. The *Location* column shows the name of the publication and the location of the position.
3. The *Name* column details the (optional) name of the position.
4. The *Format* column indicates the format of the position.
5. The *Width* column specifies the width of the format.
6. The *Height* column specifies the height of the format.
7. The *Size (kB)* column displays the maximum file size of the format.
8. The *Position type* column details the [position type](https://documentation.adhese.org/books/inventory-setup/page/positions#bkmrk-position-types) of the position.
9. The content of the *Subformats* column is hidden by default. To display the content, click *Show*. The *Subformats* column shows all subformats that belong to the position's format.

To filter the *Positions* belonging to a specific publication, select a publication from the **Show only** drop-down menu above the list and click the magnifying glass icon.

You can also filter the *Positions* screen by the status of a position's connected format using the **Filter** drop-down menu. Determine the number of results to display from the **Number of results** drop-down.

Use the **search** bar to search for specific positions, e.g. by entering a subformat. You can sort the list of positions by location, the name of the position, or the format by clicking the relevant table column's heading.

Download a **spreadsheet** file that contains a list of all positions by clicking the *Download all positions as spreadsheet* button.

### Create a new position

To create a new position for each desired combination of a format and location of a publication:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Positions*. The *Positions* screen opens:
    
    [![Schermafdruk van 2024-10-22 09-59-58.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/rGfAjx3Q4Rf2nTMb-schermafdruk-van-2024-10-22-09-59-58.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/rGfAjx3Q4Rf2nTMb-schermafdruk-van-2024-10-22-09-59-58.png)
3. Click the *Create a position* button. This opens the *Create a new position* screen.  
    [![Schermafdruk van 2024-10-22 10-15-45.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/8bpvfyIeV4I6suuj-schermafdruk-van-2024-10-22-10-15-45.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/8bpvfyIeV4I6suuj-schermafdruk-van-2024-10-22-10-15-45.png)
4. Choose a location from the **Location** drop-down.
5. Choose a format from the **Format** drop-down.
6. (Optional) Enter a name for the position in the **Name** field.
7. If you wish to serve, for example, a leaderboard banner ad in the header and the footer of the homepage, you have two identical formats but at a different position.   
    To differentiate between positions, enter a unique integer number and/or string of characters in the URL field for each subsequent position.
8. (Optional) In the **Preview URL** field, enter a URL for live previewing a creative. Instead of linking the preview URL to a publication, you can select a specific page where this position will appear.
9. (Optional) Enter a comment in the **Comment** field.
10. Skip the next property (Server) as it is of no significance anymore.
11. Select a position type from the **Position type** drop-down. Refer to [Position types](https://documentation.adhese.org/books/inventory-setup/page/positions#bkmrk-position-types) for a more detailed explanation of this concept.
12. Click the *Save* button beneath the form to save your new position.

<p class="callout info">To create a position with similar properties as an existing position, you can copy the existing position.</p>

### Edit a position

To edit a position:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Positions*.
3. In the list of positions, click the name of the position or click the edit icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/IstAXFeUKktevMfN-afbeelding.png) ](https://documentation.adhese.org/uploads/images/gallery/2024-06/IstAXFeUKktevMfN-afbeelding.png)for the position you want to edit. The *Edit position* screen opens:  
    [![Schermafdruk van 2024-10-22 10-18-17.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/Ka61Thjzbny12V1e-schermafdruk-van-2024-10-22-10-18-17.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/Ka61Thjzbny12V1e-schermafdruk-van-2024-10-22-10-18-17.png)
4. Change any of the position’s details.
5. Click *Save*.

### Copy a position

Copying a position is a simple method of creating a new position with similar properties to an existing one. To copy a position:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Positions*.
3. Click the copy icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/TYPfr7kY2qMK94QR-afbeelding.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/TYPfr7kY2qMK94QR-afbeelding.png) for the position you want to copy. The *Edit position (this is a copy)* screen opens:  
    [![Schermafdruk van 2024-10-22 10-18-17.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/4TMpDMxZYzDnu30w-schermafdruk-van-2024-10-22-10-18-17.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/4TMpDMxZYzDnu30w-schermafdruk-van-2024-10-22-10-18-17.png)
4. Change any of the position’s details.
5. Click *Save*.

### Delete a position

To delete a position:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Positions*.
3. In the list of positions, click the publisher's name or click the trash can icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/4akUlCmC1bDKiPTu-afbeelding.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/4akUlCmC1bDKiPTu-afbeelding.png)for the position you want to delete.
4. Click the **Yes, remove this position** button to confirm.

If a position has delivered impressions in the past and is deleted, it will be set to inactive.

Reports stay available after the removal of a position.

# Position types

Position types add additional functionality to a position. Their main purpose is to define the MIME type of the response and the possible templates wrapped around the output.

<p class="callout info">A MIME type or Internet Media Type is used to ensure that the receiver correctly interprets the resource. A MIME type indicates the type of data contained in a file. Web browsers use MIME types to determine how to display files that are not in HTML format.</p>

Position types are client-specific implementations that are defined in the setup stage.

The *Position types* screen presents a table with three columns:

1. The *N*<sup>*o*</sup> column displays the ID of the position type.
2. The *Position type* column shows the name of the position type.
3. The *Template* column shows the template that belongs to the position type.

### Create a new position type

To add a position type:

1. Click *Admin* in the left navigation menu. This opens the *Administration* screen.
2. Click *Position types*, the *Position types* screen opens:  
    [![Schermafdruk van 2024-10-22 10-23-47.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/s2BQ9QgPy7CAickm-schermafdruk-van-2024-10-22-10-23-47.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/s2BQ9QgPy7CAickm-schermafdruk-van-2024-10-22-10-23-47.png)
3. Click the *Create a new position type* button. The *Create a new position type* screen opens:  
    [![Schermafdruk van 2024-10-22 10-24-09.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/pWAf7rkBMfQipIdm-schermafdruk-van-2024-10-22-10-24-09.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/pWAf7rkBMfQipIdm-schermafdruk-van-2024-10-22-10-24-09.png)
4. Enter a name for the position type in the **Name** field*.*
5. In the **Force “Never empty”** drop-down, select one of the following: 
    - Select ***Yes*** to ensure that the position always displays an ad. This is particularly useful when a web page would otherwise break if no ad is available.
    - ***Continuous*** is a specific option for email campaigns. Select *Continuous* to equate the delivery period of the booking to the delivery period of the email campaign. The booking will show a configurable number of days before and after the start and end date. If you create a booking for this position, you will receive the following notification:
        
        [![create_a_new_position_type3.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/AtEHjpNC0GEyTmCZ-create-a-new-position-type3.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/AtEHjpNC0GEyTmCZ-create-a-new-position-type3.png)
        
        <p class="callout info">Make sure the request contains the <i>da</i> (date) parameter.</p>
    - Select ***No*** if none of the above options applies.
6. (Optional) Select a template file from the **Template file** drop-down. Refer to [Templates](https://documentation.adhese.org/books/adhese-ui/page/the-administration-screen#bkmrk-formats-and-template) for more information about template files.
7. Select an output type (*JavaScript*, *HTML*, *filename*, or *XML*) from the **Output type** drop-down.
8. (Optional) In the **Preview template** field, provide a template if a template is necessary to render the preview correctly.
9. Click the *Save* button.

### Edit a position type

To edit a position type:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Position types*.
3. In the list of position types, click the name of the position type or click the edit icon [![afbeelding.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/IstAXFeUKktevMfN-afbeelding.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/IstAXFeUKktevMfN-afbeelding.png) for the position type you want to edit. The *Edit position type* screen opens:  
    [![Schermafdruk van 2024-10-22 10-24-50.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/42EksCnTUkhpWQTv-schermafdruk-van-2024-10-22-10-24-50.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/42EksCnTUkhpWQTv-schermafdruk-van-2024-10-22-10-24-50.png)
4. Change any of the position type’s details.
5. Click *Save*.

# Channels

Channels are a collection of positions within a publication (e.g. run-of-site) or across your network of publications (e.g. run-of-network). **Channels** group identical formats across different locations and make it easy to target ads across similar web pages.

All our [forecasting](https://documentation.adhese.org/books/adhese-ui/page/inventory-screenforecasting#bkmrk-inventory-%2F-forecast) options include channels.

The *Channels* screen shows a table with three columns:

1. The *N<sup>o</sup>* column displays the ID of the location.
2. The *Channels* column shows the name of the publication, location, and format.
3. The *N<sup>o</sup>* of items column indicates for each channel the number of items it incorporates.

Download a **spreadsheet** file that contains a list of all channels by clicking the *Download all channels as spreadsheet* button.

# Create a new channel

To create a new channel:

1. Create a new location; see [Create a new location](https://documentation.adhese.org/books/inventory-setup/page/locations#bkmrk-create-a-new-locatio) chapter. <p class="callout info">Do not forget to select a group level in the **Channel** drop-down.  
    The highest group level is 1. The higher the number the lower the group level. For more information on group levels, see [this page](https://documentation.adhese.org/books/campaign-management/page/the-delivery-scheme-of-adhese-explained#bkmrk-location-level).</p>
2. Create a new position; see [Create a new position](https://documentation.adhese.org/books/inventory-setup/page/positions#bkmrk-create-a-new-positio) chapter.
3. Click *Channels* in the *Administration* screen. The *Channels* screen opens:  
    [![Schermafdruk van 2024-10-22 13-20-11.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/97264bl4BsHRSsXx-schermafdruk-van-2024-10-22-13-20-11.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/97264bl4BsHRSsXx-schermafdruk-van-2024-10-22-13-20-11.png)
4. Click the channel position you have just created. The *Edit channel* screen opens. Based on the selected format, all available positions across your entire network appear in the left column.  
    [![Schermafdruk van 2024-10-22 13-21-08.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/aTYPBtxtBHFH22XR-schermafdruk-van-2024-10-22-13-21-08.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/aTYPBtxtBHFH22XR-schermafdruk-van-2024-10-22-13-21-08.png)
5. To add a position to the channel, select a position from the list of available positions on the left and click the &gt;&gt;&gt; button.
6. To remove a position from the channel, select a position from the right-hand list of positions in the channel and click the &lt;&lt;&lt; button.
7. Click the *Save* button to finish.

# Edit a channel

To edit a channel:

1. Go to the *Administration* screen. Click *Admin* in the left navigation menu.
2. Click *Channels*. The *Channels* screen opens.
3. On the *Channels* screen, click the name of the channel you want to modify or use the edit icon [![edit.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/Gk6rxgFjOAIS2eci-edit.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/Gk6rxgFjOAIS2eci-edit.png). The *Edit channel screen* opens.
4. Change the channel by: 
    1. Including additional positions: 
        1. Select the position from the list on the left, and
        2. Click the &gt;&gt;&gt; button.
    2. Excluding positions from the channel: 
        1. Select the position from the list on the right, and
        2. Click the &lt;&lt;&lt; button.
5. Click *Save*.

# List all channels and positions

To obtain a list of all Channels and positions, and a list of all positions that are not currently in a Channel, go to Administration and click *Channels*. On the *Channels* screen, click the *Download all channels as spreadsheet* button.

The spreadsheet contains two tabs:

- **Positions**, listing all channels and the positions they currently contain, with the following columns:
    
    
    - Position ID
    - Position publication
    - Position location
    - Position format
    - Channel ID
    - Channel publication
    - Channel location
    - Channel format
    - Channel group level
- **Positions not in channels**, listing all positions not currently in a channel, with the following columns:
    
    
    - Position ID
    - Position publication
    - Position location
    - Position format

# Request Endpoints

Adhese supports the integration of the Adhese ad server into mobile applications using **ad tags**.

Ad tags are code snippets that inform the Adhese ad server about the available inventory it can target. To achieve this, an ad request URL is sent with all the necessary information and targeting parameters. Adhese responds to this request with a JSON response that allows the application to deliver an ad and correctly track its impressions and clicks.

## URL structure

An example of a request URL that contains only the basic (**required**) parts:  [ `https://ads-demo.adhese.com/json/sl_sdk_example_-leaderboard/?t=244.18664863333106` ](https://ads-demo.adhese.com/json/sl_sdk_example_-leaderboard/?t=244.18664863333106) 

- `https://ads-[account].adhese.com`
    - You can find the value of the account attribute in your Adhese subscription information or through our support portal.
- `/json/`
    - Adding this part to the URL makes sure that the result you receive is JSON formatted.
    - JSON has a fixed structure and, therefore, fixed fields. Refer to the [List of JSON response structure object fields](https://documentation.adhese.org/books/integration-setup/page/general-json-response-structure) for an explanatory list of the fields.
- `/sl[location code]-[format code]/`
    - `sl` Is the prefix for the section which contains the [position](https://documentation.adhese.org/books/inventory-setup/page/positions) information and is followed by two codes, separated by a dash `-` .
    - The location code has to match the **URL code** of the corresponding [location](https://documentation.adhese.org/books/inventory-setup/page/locations) in Adhese.
    - The format code has to match the **code tag** of the [format](https://documentation.adhese.org/books/inventory-setup/page/formats) you wish to request.
- `?t=[timestamp]`
- It is necessary to add a timestamp to avoid caching issues.

### Additional parameters

The request URL can contain additional parameters for [Targeting](https://documentation.adhese.org/books/campaign-management/page/bookings#bkmrk-targeting). 

An URL that contains targeting will look like this: [`https://ads-demo.adhese.com/json/sl_sdk_example_-leaderboard/brChrome;OSX/dtdesktop/incars?t=244.18664863333106`](https://ads-demo.adhese.com/json/sl_sdk_example_-leaderboard/?t=244.18664863333106)

A 2-letter combination (e.g. br, dt or in) prefixes every target parameter and the actual target(s) comes after. If a parameter contains more than one target, use a semicolon to separate the different values.

The configuration of your Adhese account determines the available targeting parameters and their prefixes. Please get in touch with our [Support team](mailto:support@adhese.com) for more details.

Every account contains the following default parameters:

- `/br`: brands or data about the browser and operating system; 
- `/dt`: device type, such as phone, tablet, desktop or unknown;
- `/in`: interests, this parameter is user-defined.
- `/tl`: consent indicator, values `none`|`all`, default is `none`

## Response structure

The request returns a JSON object with the fields described in the [List of JSON response structure object fields](https://documentation.adhese.org/books/integration-setup/page/general-json-response-structure). Adhese returns an empty JSON object (just two curly brackets) if it cannot deliver a suitable ad for the request.

# Clients

## Add a client

In the *Header* tab of a campaign, you can add several parties or companies in the [Client](https://documentation.adhese.org/books/campaign-management/page/campaigns#bkmrk-client) part.

To add a new company to your account:

1. Click *Customers* on the *Administration* screen. The *Customers* screen opens:  
    [![Schermafdruk van 2024-10-28 10-19-59.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/sUwSlPMbtmCaBxei-schermafdruk-van-2024-10-28-10-19-59.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/sUwSlPMbtmCaBxei-schermafdruk-van-2024-10-28-10-19-59.png)
    
      
    For more information about the *Customers* screen, refer to [Customers](https://documentation.adhese.org/books/adhese-ui/page/the-administration-screen#bkmrk-customers).
2. To add a new client or company, click the *Add a new company* button. The *Add a new company* screen opens:  
    [![Schermafdruk van 2024-10-28 10-24-14.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/qypzvApuiSKXn8jM-schermafdruk-van-2024-10-28-10-24-14.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/qypzvApuiSKXn8jM-schermafdruk-van-2024-10-28-10-24-14.png)
3. Define the following details:
1. (Optional) Select a billing method for the company from the **Invoice type** drop-down.
2. Enter the name of the company in the **Company name** field.
3. (Optional) Enter an abbreviated company name in the **Quote** field.
4. Enter the AMS ID of the company in the **AMD** field.
5. (Optional) Enter the VAT number of the company in the **VAT number** field.
6. (Optional) Enter the name of the street of the company's address in the **Street** field.
7. (Optional) Enter the number of the company's address in the **Number** field.
8. (Optional) Enter the postal code of the company's address in the **Postal code** field.
9. (Optional) Enter the city of the company's address in the **City** field.
10. (Optional) Enter the country of the company's address in the **Country** field.
11. (Optional) Enter the telephone number of the company in the **Phone** field.
12. (Optional) Enter the fax number of the company in the **Fax** field.
13. (Optional) Enter the email address of the company in the **Email** field.

5. Click the *Save* button.

## Add a new contact

To add a contact to a company:

1. Click *Customers* on the *Administration* screen. The *Customers* screen opens.
2. Click the company's name or click the edit icon for the company you want to add a client to.
3. Above the form, click the *Add a new contact* button. The *Add a new contact* screen opens:   
    [![Schermafdruk van 2024-10-28 10-24-52.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/GLHPditYzuf5H3sC-schermafdruk-van-2024-10-28-10-24-52.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/GLHPditYzuf5H3sC-schermafdruk-van-2024-10-28-10-24-52.png)
4. Define the following details: 
    1. Enter the name of the contact in the **First name** field.
    2. Enter the surname of the contact in the **Last name field.**
    3. Enter the email address of the contact in the **Contact email** field.
    4. (Optional) Enter the phone number of the contact in the **Contact phone** field.
    5. (Optional) Choose a language from the **Contact language** drop-down.
    6. (Optional) Select a gender from the **Contact gender** drop-down.
5. Click the *Save* button.

## Edit a client

To edit a client or customer:

1. Click *Customers* on the *Administration* screen. This opens the *Customers* screen.
2. To edit a client or company, click the company's name you want to modify or click the edit icon [![edit.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/0qpcu8CUmHUF5WHR-edit.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/0qpcu8CUmHUF5WHR-edit.png). The *Edit company information* screen opens:  
    [![Schermafdruk van 2024-10-28 10-27-40.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/Y5FKYQvHdoVGz6SW-schermafdruk-van-2024-10-28-10-27-40.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/Y5FKYQvHdoVGz6SW-schermafdruk-van-2024-10-28-10-27-40.png)
3. Change any of the details.
4. Click the *Save* button.

## Delete a client

To delete a client:

1. Click *Customers* on the *Administration* screen. The *Customers* screen opens.
2. To delete a company, click the company's name you want to delete or click the edit icon [![edit.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/IDBElMGCmr5txQbI-edit.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/IDBElMGCmr5txQbI-edit.png). The *Edit company information* screen opens.
3. Beneath the form, click the *Delete this company* button.

# 3rd party tags through 3PAS

[Google](https://developers.google.com/third-party-ads/adx-vendors) accepted Adhese as a certified third-party server. This certification allows clients to upload third-party tags of Adhese to Google.

The syntax of these certified tags is as follows:

```html
<div data-adhese-account="demo" data-adhese-slot="sl_google_banner_html5_js_-imu" data-adhese-click="">
<script src="https://pool-demo.adhese.com/tag/adhese_3pas.js" type="text/javascript"></script>
</div>
```

It consists of HTML markup containing three data fields:

- **data-adhese-account (required)**: the name of your Adhese account
- **data-adhese-slot (required)**: the full code of the Adhese position you want to create a tag for
- **data-adhese-click (optional):** click macro that will allow you to count clicks in the adserver

<p class="callout info">The adhese_3pas script is not available by default. Contact <a href="https://documentation.adhese.org/books/support/page/adhese-support">Adhese support</a> if it is the first time integrating 3PAS tags on your account.
</p>

Composing the slot code

The full slot code consists of a few values that can be located within the admin UI of your Adhese account: `sl[location code][position code]-[format code]`

- The`sl` prefix **(required)**
- The **location** code: matches the **URL code** of the corresponding Adhese [location](https://documentation.adhese.org/books/inventory-setup/page/locations). **(required)**
- The **position** code: matches the **URL code** of the corresponding Adhese [position](https://documentation.adhese.org/books/inventory-setup/page/positions). **(optional)***
- The **format** code: matches the **code tag** of the [format](https://documentation.adhese.org/books/inventory-setup/page/formats) you wish to request. **(required)**

***The position code is optional, as this field can be left empty when creating a position in Adhese**

# The implementation of the Adhese ad tags

<p class="callout info">This information refers to the old Adhese SDK, for current information on setting up the inventory and slots, see: [Typescript SDK](https://documentation.adhese.org/books/integration-setup/page/typescript-web-sdk)</p>

Once you have mapped the structure of your inventory and created the appropriate positions, it is time to create and implement the ad tags. **Ad tags** are the foundation of our technology. They allow us to deliver and measure targeted campaigns.

## How to get started with Adhese

1. Load the following piece of JavaScript code in the `<head>` of the page:
    
    ```html
    <script type="text/javascript" src="adhese.min.js"></script>
    
    ```
2. Provide a local function that returns the content identification:
    
    ```html
    <script type="text/javascript">
        function getLocation() {
        return "_demo_test_";
        }
    </script>
    
    ```
3. Initialize the Adhese instance:
    
    ```javascript
    varadhese = newAdhese();
    adhese.init({debug:true, account:"demo", location: getLocation });
    // value of the account attribute can be found in your Adhese subscription information or through our support portal.
    
    ```

## Implementation of the Adhese ad tag

### Legacy requests

Legacy requests are implemented as a `script` fragment inside the `<div>` container where they will be visualized. The client executes the request and inserts the response in the `<div>` container with a `document.write` statement. However, this implementation method is not recommended if you want to take advantage of viewable tracking and forecasting. It also has performance drawbacks, as the client's document builder is blocked while requesting an online ad.

For each ad you want to serve on a web page, you should create a `<div>` container with a unique ID that matches the requested format, and then make a call to the `adhese.tag` function.

```html
<div id="leaderboard">
    <script type="text/javascript" charset="utf-8">
        var ad = adhese.tag("leaderboard", { write: true });
    </script>
</div>


```

#### Asynchronous JSON and JSONP requests

Asynchronous requests allow you to make a request first and visualise the response later. The implementing client is responsible for correct reporting.

The JSON or JSONP implementation method allows all ads to be bundled into a single request and the creative to be visualised in the right place. With this method, it is easy to take into account the moment when the creative has a real change to be seen, better known as viewability or in-view. This implementation method is the most suitable and favourable method to use in a responsive environment.

A tracker URL that is passed in the response should be requested when visualizing the ad. The code can be built with an extra AJAX request handler. If you plan to implement in a client that is already capable of performing asynchronous requests, you can omit this part of the SDK from the dist file by running 'make noajax'.

The next piece of code is a basic ad tag that tells the client to continue loading everything else on the page while it waits for the leaderboard ad creative request. This ad tag needs to be pasted between the HTML `<body>` tags, in the position where you want the leaderboard ad to be served.

```javascript
adhese.tag("leaderboard", {async:true;});

```

If the client has to request data from a different domain than your own, you’ll need to implement the next JavaScript tag:

```html
<script src="http://ads.adhese.com/ad/jsonp/callback/sl_homepage_-leadboard/sl_homepage_-banner/sl_homepage_-skyscraper"></script>

```

The above script allows you to simultaneously load all your ad creatives at once: the leaderboard, banner and skyscraper ad. Next to this code, you still need a code that puts the ads in the right position.

## IAB Safeframe

Adhese used to support SafeFrame by default. To turn it off, initialize your Adhese instance with the `safeframe` option set to false.

```javascript
var adhese = newAdhese();
adhese.init({ debug: true, account: "demo", location: getLocation, safeframe: false });

```

<p class="callout warning">Safeframe used to be on by default, but this is no longer the case with the new SDK and doesn't need to be disabled anymore when using the Typescript SDK.</p>

# Video Integration with VAST

The Adhese VAST JS library is designed to make it easy to integrate VAST ads into video players. It includes cross-domain safe methods for requesting ads from your Adhese account and convenient methods for playing and tracking video ads. However, it is not a player on its own and does not insert anything into the DOM.

1. Load the JavaScript file:
    
    ```javascript
    <script type="text/javascript" src="adhese-vast.js"></script>
    
    ```
2. Create an `AdheseVastWrapper` object:
    
    ```javascript
    var wrapper = newAdheseVastWrapper();
    
    ```
3. Register a listener for the ADS\_LOADED event fired by `AdheseVastWrapper` The first parameter is the event name, and the second is the name of your callback function. This function will be called when the wrapper is ready to handle your ad request.
    
    ```javascript
    wrapper.addEventListener("ADS_LOADED", yourCallBackFunction);
    
    ```
4. Initiate an ad request by providing the host of your Adhese account and the slot path and target parameters you want to request.
    
    ```javascript
    wrapper.requestAds("http://ads.demo.adhese.com", "_test_", ["preroll", "postroll"]);
    
    ```
5. Once the request is finished, `AdheseVastWrapper` will fire the ADS\_LOADED event, and your callback function will be called. From then on, you can access several properties of the wrapper object to get info on the ads.

This is a complete example:

```html
<html>
<head>
    <script type="text/javascript"src="dist/adhese-vast.min.js">
        </script>
</head>
<body>
    <!-- create a player and info pane container -->
    <h1 id="info">
        </h1>
        <div id="player">
            </div>
            <script type="text/javascript">
                 
                // just for completing the example, the content that will be shown after the example ad
                var actualContentSrc = "http://media.w3.org/2010/05/bunny/movie.mp4";
                 
                // get reference to the container elements
                var playerContainer = document.getElementById("player");
                var infoContainer = document.getElementById("info");
                 
                var a = new AdheseVastWrapper(true);
                a.init();
                a.addEventListener("ADS_LOADED", adsAreLoaded);
                a.requestAds("http://ads.demo.adhese.com", "_sdk_example_", ["preroll"]);
                 
                function adsAreLoaded() {
                console.log("adsAreLoaded")
                 
                // if has preroll, show it
                if (a.hasAd("preroll")) {
                // display duration
                infoContainer.innerHTML = "ad takes " + a.getDuration("preroll") + " time, stay tuned";
                 
                // create source element for video
                var adSrc = document.createElement("source");
                adSrc.src = a.getMediafile("preroll","video/mp4");
                adSrc.type = "video/mp4";
                 
                // create desired video element
                var adPlayer = document.createElement("video");
                 
                adPlayer.width = 640;
                adPlayer.height = 480;
                adPlayer.autoplay = "true";
                 
                // if using a flash based player: make sure adPlayer is a reference to the flash object and
                allowScripAccess is true
                // event names will be different in flash as well, depending on how video playback is implemented
                 
                // attach to timeupdate event for passing the currentTime, this allows adhese to track the actual
                viewing of the ad
                adPlayer.addEventListener("timeupdate", function() { a.timeupdate("preroll", adPlayer.currentTime); },
                true);
                // clicks on video player should be sent to adhese for handling and reporting
                adPlayer.addEventListener("click", function() { a.clicked("preroll", adPlayer.currentTime); }, true);
                // when playing has ended, tell and adhese and than continue to showing content
                adPlayer.addEventListener("ended", function() { a.ended("preroll", adPlayer.currentTime);
                showActualContentAfterPreroll(); }, true);
                 
                //add the source to the video element
                adPlayer.appendChild(adSrc);
                 
                // ad the video element to the player container
                playerContainer.appendChild(adPlayer);
                }
                 
                }
                 
                function showActualContentAfterPreroll() {
                // here comes the code to start your content after the ad
                infoContainer.innerHTML = "Feature film starting. Enjoy!";
                playerContainer.innerHTML = '
                <video id="video"controls=""autoplay=""width="640"height="480"preload="none"poster="http:
                    //media.w3.org/2010/05/bunny/poster.png">
                    <source id="mp4"src="http: //media.w3.org/2010/05/bunny/movie.mp4"type="video/mp4">
                        <source id="ogv"src="http: //media.w3.org/2010/05/bunny/movie.ogv"type="video/ogg"></video>';
                            }
            </script>
</body>
</html>

```

## Ad Pods (VAST &amp; JSON)

### About Ad Pods

An Ad Pod is a sequenced group of ads that allows publishers to display multiple ads within a single ad placement.

In the case of VAST, the ads can play before, during, or after the video content. In this case, ad pods are very similar to TV commercial breaks.

Pods are populated by [Advar templates](https://documentation.adhese.org/books/templating/page/advar-templates). We support two formats: VAST XML and JSON.

### Request

Fill in the necessary brackets in the following ad pod request URL and paste it into your VAST-supporting video player.

```
https://ads-[client].adhese.com/m/[adpod type]/sl[position identification]/[targeting]/?max_ads=[max number of desired ads]&t=[timestamp]

```

- adpod type — **adpod** for VAST, **stack** for JSON.
- max\_ads — the returned number of ads will depend on different parameters, like availability and targeting, but will never exceed max\_ads.

### Output

**VAST**

```
<VAST version="3.0>
  All returned VAST ads.
<VAST/>

```

**JSON**

```
{
  "ads": [
	#JSON objects, one per ad.
  ]
}

```


### Sequencing

Sequence suggestions are optional, and the given sequence number will not end up in the final ad, but Adhese will do its best to place the ad in the desired position within the pod. If `sequence=0`, the ad is preferred to be placed first in a pod. If `sequence=-1`, the ad prefers to be placed last in a pod. If `sequence=1`, it prefers the second place, and so on. This ordering happens after the ads are selected, so there is no guarantee that an ad with `sequence=0` will always be first in the pod (unless it is the highest priority of all possible options).

You can enter any number as a sequence suggestion. For example `sequence=<ADHESE_LIB_ID>`(in the template) will sort the ads in a pod by creative ID.

#### Templates

**VAST**

```
<Ad sequence="0">
VAST ad implementation
</Ad>

```

**JSON**

```
{
  "sequence": 0,
  "example field": "some value"
}

```

<p class="callout warning">The sequence field must be added to the **main structure** of the JSON template. The order logic will not work if the field is added to a nested object within the JSON template. The field will be **stripped from the response** when the Adpod or Stack response is rendered.</p>

</body></html>

# System-wide over-delivery

An over-delivery percentage can be configured. For example, if set to 2%, each campaign will deliver 2% more impressions than initially booked. An over-delivery percentage is applied to prevent minimal under-delivery of third-party ads in the event of reporting [discrepancies](https://documentation.adhese.org/books/troubleshooting/page/general-troubleshooting)

<p class="callout info">Don't hesitate to contact support if you want to increase or decrease your system-wide over-delivery percentage.</p>

<p class="callout success">The default overdelivery value is 5%</p>

# How to deal with responsive web pages

The increasing use of various devices such as smartphones, phablets, tablets, and laptops highlights the importance for publishers and advertisers to adopt a responsive strategy.

The design of a **responsive** website adjusts to the size of the device's browser screen. In contrast, the website's content's readability or interface's usability is not compromised.

**The technology of Adhese can deliver the same creative across multiple devices.** You only need to determine the display resolution in which the creative dimensions will adequately fit. An ad will only be displayed (and counted as an impression) if the ad request is sent from a device that can guarantee the correct delivery of the ad. So, you don't need to create a booking or upload a creative for each different kind of device, manufacturer or browser you'd like to target. However, advertisers can still deliver an optimised creative for each device they want to target separately.