YouTube iOS App ID Causes INVALID_MOBILE_APP CriterionError

238 views
Skip to first unread message

Mark Rogoyski

unread,
Jun 13, 2016, 2:18:36 PM6/13/16
to AdWords API Forum
In a Display Network - mobile app installs campaign, when trying to set a campaign placement exclusion for the Google YouTube mobile app on iOS using a NegativeCampaignCriterion, the API returns the following error:
[CriterionError.INVALID_MOBILE_APP @ operations[0].operand.criterion.appId; trigger:'1-544007664']

The mobile app ID is valid:

Furthermore, when querying for stats using the API, the same app ID gets returned. For example, from the URL Placement Report:
URL: mobileapp::1-544007664
Criteria Display Name: Mobile App: YouTube (iTunes App Store), by Google, Inc.

Here is the XML SOAP exchange that leads to the error:

[Jun 13 2016 17:58:32.000000 - ERROR] POST /api/adwords/cm/v201605/CampaignCriterionService HTTP/1.1
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.9-1ubuntu4.11, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 488
Authorization: {REDACTED}

<?xml version="1.0" encoding="UTF-8"?>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>{REDACTED}</ns1:clientCustomerId>
      <ns1:developerToken>{REDACTED}</ns1:developerToken>
      <ns1:userAgent>{REDACTED}</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand xsi:type="ns1:NegativeCampaignCriterion">
          <ns1:campaignId>281979435</ns1:campaignId>
          <ns1:criterion xsi:type="ns1:MobileApplication">
            <ns1:appId>1-544007664</ns1:appId>
          </ns1:criterion>
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 13 Jun 2016 17:58:32 GMT
Expires: Mon, 13 Jun 2016 17:58:32 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
      <requestId>0005352ca2efbd580a4c0a442a014aaa</requestId>
      <serviceName>CampaignCriterionService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>80</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[CriterionError.INVALID_MOBILE_APP @ operations[0].operand.criterion.appId; trigger:'1-544007664']</faultstring>
      <detail>
        <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201605">
          <message>[CriterionError.INVALID_MOBILE_APP @ operations[0].operand.criterion.appId; trigger:'1-544007664']</message>
          <ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CriterionError">
            <fieldPath>operations[0].operand.criterion.appId</fieldPath>
            <trigger>1-544007664</trigger>
            <errorString>CriterionError.INVALID_MOBILE_APP</errorString>
            <ApiError.Type>CriterionError</ApiError.Type>
            <reason>INVALID_MOBILE_APP</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Thanet Knack Praneenararat (AdWords API Team)

unread,
Jun 14, 2016, 2:06:52 AM6/14/16
to AdWords API Forum
Hi Mark,

Let me check and get back to you when I have updates.

Cheers,
Thanet, AdWords API Team

Mark Rogoyski

unread,
Jul 25, 2016, 3:54:52 PM7/25/16
to AdWords API Forum
Hi,

Any update on this issue?

Also FYI, it also happens with the Android YouTube app:
[CriterionError.INVALID_MOBILE_APP @ operations[1].operand.criterion.appId; trigger:'2-com.google.android.youtube']

Thanks.
Mark

Thanet Knack Praneenararat (AdWords API Team)

unread,
Jul 25, 2016, 7:38:06 PM7/25/16
to AdWords API Forum
Hello Mark,

Sorry for this delay.
I'm still following up this issue. 

Best,
Thanet, AdWords API Team

Thanet Knack Praneenararat (AdWords API Team)

unread,
Aug 18, 2016, 11:36:57 PM8/18/16
to AdWords API Forum
Hello Mark,

I'm really sorry for this late response.
I've just got confirmation back from the person in charge of this feature.

The answer is that it's by design that YouTube apps can't be targeted for exclusion.
This is because YouTube mobile app is considered as YouTube network and not a single mobile app in video campaigns targeting.
That's why you saw an error when trying to use the YouTube mobile app ID for campaign placement exclusion.

Cheers,
Thanet, AdWords API Team

Mark Rogoyski

unread,
Aug 22, 2016, 2:55:02 PM8/22/16
to AdWords API Forum
Hi Thanet,

Thank you for the response.

However, this still leaves the intent of my original question unanswered. How do you exclude YouTube from a Display Network - mobile app installs campaign when the mobile placements are mobile apps, and the YouTube app can't be targeted for exclusion?

Thanks.
Mark

Josh Radcliff (AdWords API Team)

unread,
Aug 23, 2016, 9:10:40 AM8/23/16
to AdWords API Forum
Hi Mark,

Have you tried adding a Placement exclusion for site.youtube.com?

Thanks,
Josh, AdWords API Team

Mark Rogoyski

unread,
Aug 23, 2016, 2:34:42 PM8/23/16
to AdWords API Forum
Hi Josh,

I get the same result for site.youtube.com and www.youtube.com:
[CriterionError.INVALID_MOBILE_APP @ operations[0].operand.criterion.appId; trigger:'site.youtube.com']
[CriterionError.INVALID_MOBILE_APP @ operations[0].operand.criterion.appId; trigger:'www.youtube.com']

Keep in mind we are running DISPLAY mobile app install campaigns (ads in mobile apps), and when targeting broad categories, we get YouTube showing up as a placement. With any other app, when we get stats reports, we get the app ID (mobileapp::[APP ID HERE]) and can auto exclude placements based on poor performance or whatever by using the mobile app ID we get in stats reports.

With YouTube, it seems to behave differently from any other mobile app placement. Sometimes we get the mobile app ID (mobileapp::1-544007664 for iOS, mobileapp::2-com.google.android.youtube for Android), or we'll get individual Web URLs (ex: www.youtube.com/video/[VIDEO ID HERE]). Either way, we cannot auto exclude the YouTube placement in our automated system when the performance is poor because any ID we get from AdWords stats reports is rejected as being an invalid mobile app from the AdWords API.

Mark

Josh Radcliff (AdWords API Team)

unread,
Aug 23, 2016, 4:49:11 PM8/23/16
to AdWords API Forum
Hi Mark,

Sorry, I should have been clearer. What I meant was to try adding a NegativeAdGroupCriterion where the criterion is a Placement with url = "site.youtube.com". Please give that a try and let me know how it goes.

Thanks,
Josh, AdWords API Team

Mark Rogoyski

unread,
Aug 23, 2016, 5:47:27 PM8/23/16
to AdWords API Forum
Hi Josh,

Thanks for the tip. I was able to successfully add a placement exclusion at the campaign level by changing the NegativeCampaignCriterion's criterion from MobileApplication to Placement and setting the url to site.youtube.com.

So it is possible to exclude YouTube from a Display mobile app install campaign. The problem remains that YouTube acts differently from everything else, which is a problem for systems that act on data automatically via the API.

A standard scenario:
 1) Get stats reports
 2) Analyze data
 3) Set up exclusions for poor-performing segments (using the data from stats reports).

Since these are mobile app install Display campaigns, it is assumed that the placements will be MobileApps since the campaigns is for ads in mobile apps. Also, the ID to use to set up the exclusion comes from the stats, or at least, we presumed it would. It always has until YouTube started showing up in our campaigns.

Our expectation would be for YouTube to behave like any other segment in our campaign, and be able to have an automated system make decisions based on the data from stats reports in the same manner as other segments. Also, this seems to raise the question, if YouTube has to be handled differently, are there other mobile apps (or Web sites that appear in mobile app campaigns like YouTube) that also need to be treated specially that we just don't know about?

Thanks.
Mark

Josh Radcliff (AdWords API Team)

unread,
Aug 24, 2016, 10:52:02 AM8/24/16
to AdWords API Forum
Hi Mark,

Thanks for providing a detailed explanation of your concerns. Would you mind sending me the ad group ID of one of your ad groups where this is relevant? I'd like to dig a bit more on my side so I can respond to your questions.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages