Help understanding device targeting and ad unit hierarchy

129 views
Skip to first unread message

Ostap Manastyrski

unread,
Mar 15, 2021, 1:05:10 PM3/15/21
to Google Ad Manager API Forum
Hi,
I am working with a partner who give us their adtag URL from which we fetch ads. The ad tag generated by GAM has this format for its ad hierarchy: iu=/network_code/ad_unit_1/ad_unit_2/[PLATFORM].

We have been replacing [PLATFORM] with "mobile_app" and "desktop" (I don't know the history of why we do this). I am trying to understand, how these [PLATFORM] ad units function, since we also interact with their ad units using the GAM api.
  • My partner says that they do not create "mobile_app" and "desktop" ad units themselves, but they are created automatically by GAM when we send a request and replace [PLATFORM] with something. Is this accurate?
  • Can I replace [PLATFORM] with any string and an ad unit will be generated? I don't see any docs talking about this
  • GAM API documentation says that an ad unit's adUnitCode is supposed to be unique, but how can this be so if a bunch of ad units are being generated by GAM that are all called "mobile_app" and "desktop"? https://developers.google.com/ad-manager/api/reference/v202011/InventoryService.AdUnit#adunitcode
  • I have also seen ad unit hierarchies like: iu=/network_code/ad_unit_1/mobile_app/ad_unit_2 (ie. iu=/network_code/ad_unit_1/[PLATFORM]/ad_unit_2). Are these also automatically generated by GAM or are they actual ad units created by the partner in this case?
I made a post about this here, but got no responses: https://support.google.com/admanager/thread/100505677

Cheers,
Ostap

Ad Manager API Forum Advisor Prod

unread,
Mar 17, 2021, 7:20:04 AM3/17/21
to osta...@gmail.com, google-doubleclick...@googlegroups.com

Hi Ostap,

 

An Ad Unit's adUnitCode is not equivalent to its ad tag. Ad tags are not exposed in the API. I suggest you post your concern in the Community forum or reach out to the Publisher Support team directly if you're eligible for support since this is more on the product level.

 

Regards,

Google Logo
Kevin Gil Soriano
Ad Manager API Team
 


ref:_00D1U1174p._5004Q2Dvi4w:ref

Ostap Manastyrski

unread,
Mar 17, 2021, 12:38:43 PM3/17/21
to Google Ad Manager API Forum
Thank you for the response Kevin.

I posted in the community forum, but no one responded to me (link in the original post). The "iu" query string seems exactly equivalent to the adUnitCodes separated by "/". Every example I checked has this and I've never seen a counter example. I just used the API to examine the ad units directly and I can confirm that under a single network address, I see 2 ad units with different ad unit ids but the EXACT SAME adUnitCode, which is counter to what the API doc states.

Below are the 2 ad units I examine, I replaced the sensitive information, but kept the relationship entact. You can see that both have the the same adUnitCode of "desktop".

Cheers,
Ostap

---

Device targeting ad unit 1

{
    'id': '104',
    'parentId': '103',
    'hasChildren': False,
    'parentPath': [
        {
            'id': '101',
            'name': '1111',
            'adUnitCode': '1111'
        },
        {
            'id': '102',
            'name': 'ad_unit_grand_parent_1',
            'adUnitCode': 'ad_unit_grand_parent_1'
        },
        {
            'id': '103',
            'name': 'ad_unit_parent_1',
            'adUnitCode': 'ad_unit_parent_1'
        }
    ],
    'name': 'desktop',
    'description': None,
    'targetWindow': 'BLANK',
    'status': 'ACTIVE',
    'adUnitCode': 'desktop',   // original adUnitCode in the ad unit
    ...
}

---

Device targeting ad unit 2

{
    'id': '204',
    'parentId': '203',
    'hasChildren': False,
    'parentPath': [
        {
            'id': '101',
            'name': '1111',
            'adUnitCode': '1111'
        },
        {
            'id': '202',
            'name': 'ad_unit_grand_parent_2',
            'adUnitCode': 'ad_unit_grand_parent_2'
        },
        {
            'id': '203',
            'name': 'ad_unit_parent_2',
            'adUnitCode': 'ad-ad_unit_parent_2'
        }
    ],
    'name': 'desktop',
    'description': None,
    'targetWindow': 'BLANK',
    'status': 'ACTIVE',
    'adUnitCode': 'desktop',   // original adUnitCode in the ad unit
    ...

Ad Manager API Forum Advisor Prod

unread,
Mar 18, 2021, 12:59:26 AM3/18/21
to osta...@gmail.com, google-doubleclick...@googlegroups.com

Hi Ostap,

 

I'll clarify your concern with our team. Rest assured that one of my colleagues will reach out to you as soon as possible.

Ad Manager API Forum Advisor Prod

unread,
Mar 19, 2021, 1:14:02 PM3/19/21
to osta...@gmail.com, google-doubleclick...@googlegroups.com
Hi Ostap,

Can you reply privately with the API logs or requestId so I can verify this behavior? Having an example will help me track it down.

Thanks,
Google Logo
Chris Seeley
Ad Manager API Team
 


ref:_00D1U1174p._5004Q2Dvi4w:ref
Reply all
Reply to author
Forward
0 new messages