---
title: How to customize ad unit names ?
description: Summarize how to customize ad unit names ?
---

[Skip to content](https://help.pubstack.io/migration/how-to-customize-ad-unit-names#main-content)

English

Show submenu for translations

[Contact us](https://help.pubstack.io/migration/kb-tickets/new?hsLang=en) [Customer portal](https://help.pubstack.io/tickets-view?hsLang=en)

![Logo Pubstack white.svg\]](https://help.pubstack.io/hubfs/Logo%20Pubstack%20white.svg)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Contact us](https://help.pubstack.io/migration/kb-tickets/new)
- [Customer portal](https://help.pubstack.io/tickets-view)
- Go to Pubstack

 Go to Pubstack

 Welcome on our knowledge base

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

1. [Knowledge Base](https://help.pubstack.io/migration?hsLang=en)
2. [Analytics](https://help.pubstack.io/migration/analytics?hsLang=en)
3. [Technical documentation](https://help.pubstack.io/migration/analytics?hsLang=en#technical-documentation)

# How to customize ad unit names ?

## Summarize how to customize ad unit names ?

By default, the integration uses the adUnitCode defined in the Ad Unit.  
If you want Pubstack to use another name, you just have to provide the desired value through the pubstack.adUnitName property.  
The following example shows you how to set a custom name, whatever the ad unit code is:

```
const adUnits = [    {       code: `random-adunit`,      pubstack: {          adUnitName: 'top_hb_leaderboard',      },      mediaTypes: ...      bids: [{ bidder: 'appnexus', params: ... }],    },    {     code: `random-adunit-2`,       pubstack: {           adUnitName: 'middle_hb_square',       },       mediaTypes: ...       bids: [{ bidder: 'appnexus', params: ... }],     }];   pbjs.que.push(pbjs.addAdUnits(adUnits));
```

With this feature, you also have the ability to essentially merge adUnits under the Pubstack UI, by assigning the same pubstack.adUnitName to several adUnits. This can be useful for infinite scroll adUnits, or when it comes to randomly generated adUnitCode.

- [What is Pubstack](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#main-content)

    - [Solutions description](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#solutions-description)
    - [Demo and trial](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#demo-and-trial)
- [Analytics](https://help.pubstack.io/migration/analytics?hsLang=en#main-content)

    - [The Pubstack interface](https://help.pubstack.io/migration/analytics?hsLang=en#the-pubstack-interface)
    - [Technical documentation](https://help.pubstack.io/migration/analytics?hsLang=en#technical-documentation)
    - [Use cases](https://help.pubstack.io/migration/analytics?hsLang=en#use-cases)
    - [Ad servers](https://help.pubstack.io/migration/analytics?hsLang=en#ad-servers)
    - [API](https://help.pubstack.io/migration/analytics?hsLang=en#api)
- [Ad Management (One)](https://help.pubstack.io/migration/ad-management-one?hsLang=en#main-content)

    - [Implementation](https://help.pubstack.io/migration/ad-management-one?hsLang=en#implementation)
    - [Technical Documentation](https://help.pubstack.io/migration/ad-management-one?hsLang=en#technical-documentation)
    - [Pubstack UI Ad Management](https://help.pubstack.io/migration/ad-management-one?hsLang=en#pubstack-ui-ad-management)
    - [Use Cases](https://help.pubstack.io/migration/ad-management-one?hsLang=en#use-cases)
    - [Features](https://help.pubstack.io/migration/ad-management-one?hsLang=en#features)
- [Knowledge](https://help.pubstack.io/migration/knowledge?hsLang=en#main-content)

    - [Infographics](https://help.pubstack.io/migration/knowledge?hsLang=en#infographics)
- [Technical Documentation](https://help.pubstack.io/migration/technical-documentation?hsLang=en)
- [The Pubstack Academy](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#main-content)

    - [User-Guides](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#user-guides)
    - [Webinar Episodes](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#webinar-episodes)
- [How to contact Support ?](https://help.pubstack.io/migration/how-to-contact-support?hsLang=en)
- [Pubstack Node](https://help.pubstack.io/migration/pubstack-node?hsLang=en#main-content)

    - [Introduction](https://help.pubstack.io/migration/pubstack-node?hsLang=en#introduction)
    - [Getting Started](https://help.pubstack.io/migration/pubstack-node?hsLang=en#getting-started)
    - [Analytics](https://help.pubstack.io/migration/pubstack-node?hsLang=en#analytics)
    - [Rules](https://help.pubstack.io/migration/pubstack-node?hsLang=en#rules)
    - [Monetisation Management](https://help.pubstack.io/migration/pubstack-node?hsLang=en#monetisation-management)

[![Chill listening crop-3](https://help.pubstack.io/hs-fs/hubfs/pubstack_logo.png?width=89&height=24&name=pubstack_logo.png "Chill listening crop-3")](http://www.pubstack.io?hsLang=en)

We help publishers thrive in a complex programmatic world

Copyright © 2026, Pubstack