Policy violations - v201710 vs 201706

249 views
Skip to first unread message

Peter Lanser

unread,
Jul 3, 2018, 6:51:44 AM7/3/18
to AdWords API and Google Ads API Forum
Hi, we are currently migrating from Adwords API v201710 to v201806 and we are observing an issue regarding policy violations / excemption requests.

Part of our test suite is the creation of an (expanded) text ad triggering a PolicyViolationError. Everything is fine with v201710 - we are expecting this error (and creating an excemption request later).

[INFO] com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger SOAP response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    ...
    <soap:Body>
        <soap:Fault>
            ...
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201710">
                    ...
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PolicyViolationError">
                        ...
                        <errorString>PolicyViolationError.POLICY_ERROR</errorString>
                        <ApiError.Type>PolicyViolationError</ApiError.Type>
                        <key>
                            <policyName>weapons</policyName>
                            <violatingText>Rifle</violatingText>
                        </key>
                        <externalPolicyName>Google AdWords</externalPolicyName>
                        <externalPolicyUrl/>
                        <externalPolicyDescription>This ad or keyword requires review before it can run.</externalPolicyDescription>
                        <isExemptable>true</isExemptable>
                        ...
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

However, the error is not triggered when using v201806. The expected error is not triggered:

[DEBUG] com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger SOAP response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    ...
    <soap:Body>
        <mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201806">
            <rval>
                <ListReturnValue.Type>AdGroupAdReturnValue</ListReturnValue.Type>
                <value>
                    ...
                    <ad xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ExpandedTextAd">
                        ...
                    </ad>
                    <status>PAUSED</status>
                    <policySummary>
                        <reviewState>REVIEW_IN_PROGRESS</reviewState>
                        <combinedApprovalStatus>UNDER_REVIEW</combinedApprovalStatus>
                    </policySummary>
                </value>
            </rval>
        </mutateResponse>
    </soap:Body>
</soap:Envelope>

However, we wouldn't have expected that no error is triggered at all.

Are we missing something? Why isn't the policy error triggered when using v201806?

Thanks for your help,
Peter

GregT

unread,
Jul 3, 2018, 11:20:56 AM7/3/18
to AdWords API and Google Ads API Forum
I just wanted to mention that we're experiencing something similar moving to v201806 and trying to test that things are working. We have tests where some should be exemptable ad text and some not exemptable, to make sure we handle things correctly. At this point, the only thing we can get to trigger any kind of policy violation in a test account with v201806 is multiple exclamation points, which trigger the new PolicyFindingError (which is good that we can trigger that). 

But, using all kinds of other ad text that produce PolicyViolationErrors in production in v201802 and/or are explicitly mentioned as violating the ad editorial policy (like "work @home", "big big SALE", "FR33 ShiPPiNG", "buy hunting rifle", various brand names that produce trademark violations in production, etc.) don't produce any kind of PolicyViolationError against our test accounts in v201806, breaking our tests and making it very hard to make sure the code works.

For us, and possibly Peter, if you could just give us some example ad texts that would produce both exemptable and non-exemptable PolicyViolationErrors in test accounts with v201806, that'd be good enough (rather than, for example, trying to make the test accounts in v201806 do identical policy violation checks as production).

Thanks in advance,
Greg

Josh Radcliff (AdWords API Team)

unread,
Jul 6, 2018, 11:07:56 AM7/6/18
to AdWords API and Google Ads API Forum
Hi Greg, Peter,

Thanks for providing such detailed information on this issue. I've passed this on to the policy expert on the engineering team and will let you know as soon as I have an update.

Cheers,
Josh, AdWords API Team

GregT

unread,
Jul 24, 2018, 5:11:51 PM7/24/18
to AdWords API and Google Ads API Forum
Hi, Josh.

It's been a couple weeks. Just checking in to see if there's any update?

Thanks,
Greg

Josh Radcliff (AdWords API Team)

unread,
Jul 26, 2018, 11:13:27 AM7/26/18
to AdWords API and Google Ads API Forum
Hi Greg,

Sorry for the delay. I've gathered some information but I need to work through some of the finer points and run through examples myself in order to give you a complete answer. Stay tuned!

Thanks,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Jul 26, 2018, 5:35:39 PM7/26/18
to AdWords API and Google Ads API Forum
Hi Greg,

I ran some tests and spoke with my colleagues today. Starting with v201806, some ad types will return a PolicyFindingError instead of a PolicyViolationError when there are policy issues. Here's the note we added to the Policy Exemption Requests guide for the v201806 release (yellow highlights mine):

Note: Starting in v201806, some ad types (including ExpandedTextAd) will fail with a PolicyFindingError instead. This new type of error indicates that the ad will certainly fail review again even if an exemption is requested. You can save these ads anyway by using the ignorablePolicyTopicIds field. They will fail review, but could be approved later if you fix the underlying issue, for example by getting the correct certificate.

Therefore, if you're looking to handle errors specifically for ExpandedTextAds, you'll want to:
  1. Modify your error handling to instead check for PolicyFindingError.
  2. If you want to resubmit an operation even though it's likely to wind up with policy errors, collect all of the policyTopicIds from the error's policyTopicEntries, add those IDs to the operation's ignorablePolicyTopicIds, then resubmit the operation.
You can see examples of ad text that will trigger these errors in this Advertising Policies Help page.

Cheers,
Josh, AdWords API Team

GregT

unread,
Jul 27, 2018, 12:24:14 PM7/27/18
to AdWords API and Google Ads API Forum
Hey, Josh.

Thanks for looking into this and for the information. I'd just like to clarify some things.  

1 - Are you saying that creating expanded text ads will now never produce a PolicyViolationError, and we should only be looking for PolicyFindingErrors? It seems pretty clear that that's what you (& the documentation you pasted) are saying, but I just want to double check, as it seems like that means for expanded text ads, there's really not exemptable vs. non-exemptable anymore, and there's just a single type of "exemptable but your request will be denied" violation.

2 - As I mentioned in my original July 3 post, I tried to produce (in the sandbox with v201806) policy violations by using things that are direct violations of what's given in the advertising policies page you mentioned (like "work @home", "big big SALE", "FR33 ShiPPiNG", "buy hunting rifle", various brand names that produce trademark violations in production, etc.), and these are accepted by the sandbox without issue, although production v201802 produces policy violations. As I mentioned, the only thing I can get to produce a policy violation (the new PolicyFindingError) in the sandbox for v201806 expanded text ads is multiple exclamation points in a row. Is this expected (it seems like it wouldn't be, considering you pointed to the advertising policies page for examples of ad text that should trigger errors)? I guess, in reality, if the answer to #1 above is yes, then since I can produce that error with multiple exclamation points, this question is irrelevant, although it seems odd. 

Thanks,
Greg

Anash P. Oommen (AdWords API Team)

unread,
Jul 27, 2018, 1:17:10 PM7/27/18
to AdWords API and Google Ads API Forum
Hi Greg,

Since Josh is not available, I'll answer your questions instead.

1. Yes, ETA won't produce any PolicyViolationError. Let me know if you see any behaviour otherwise, and we will investigate on priority.
2. PolicyFindingErrors (and policies in general) are a lot dependent on the account in which the ad serves, the geographies for which the ad serves, the network, whether we've seen a lot of these errors (and violations) in the past, etc. The test accounts are meant for minimal replication of policy errors; it doesn't support all combinations of PolicyViolationErrors you'd see in production accounts. My suggestion is to design your application such that you can test and verify for minimal PolicyViolationErrors against test accounts, and be able to specify additional policies as runtime-configurable.

Cheers
Anash P. Oommen,
AdWords API Advisor.

GregT

unread,
Jul 27, 2018, 3:53:56 PM7/27/18
to AdWords API and Google Ads API Forum
Great - thank you both for clearing things up!

Greg

peter.r...@smarter-ecommerce.com

unread,
Sep 6, 2018, 4:51:49 AM9/6/18
to AdWords API and Google Ads API Forum
Hi Josh, Hi Anash

Can I find an overview of all policyTopicIds ? 

Are all policy topics listed here and do the return values of the API correspond with this documentation ? 

Thanks! 
Peter

peter.r...@smarter-ecommerce.com

unread,
Sep 6, 2018, 9:33:37 AM9/6/18
to AdWords API and Google Ads API Forum
Hi Anash

Regarding point 2. 

I am trying hard to force some PolicyFindingErrors now even in non test accounts. Our tests forced PolicyViolationErrors beforehands by e.g. creating expanded text ads containing terms like "heroin" or "rifles" (done in a test account), but when I try to run the same tests against a non test account with the updated API version (v201806), these ads are just created without any further notice. 

I definitely need to trigger PolicyFindingErrors for a couple of violations in order to check for policyTopicIds and messages (such as "Online pharmacy certification required" or "Inappropriate Language") just to cross check how I can map previous error handling (based on PolicyViolationError) to the information  that is now returned by the new PolicyFindingError. 

We previously used the information provided by 
PolicyViolationError.externalPolicyName
PolicyViolationError.isExemptable
PolicyViolationError.key.violatingText
PolicyViolationError.key.policyName

Can you provide a mapping to PolicyFindingError for these fields ? It would be really helpful if you could provide advice on how to proceed here.

Just to give you a complete picture: I am also trying to send keywords with the same terms test as well as non test accounts still return a proper PolicyViolationError even for v201806. 

Thank you for help!
Peter

Josh Radcliff (AdWords API Team)

unread,
Sep 7, 2018, 4:34:46 PM9/7/18
to AdWords API and Google Ads API Forum
Hi Peter,

The easiest way I've found to cause a PolicyFindingError is to intentionally put excessive punctuation in the ad. This will result in an error related to the Punctuation and symbols policies.

The mapping of fields isn't 1:1, but the following are some rough equivalents:
I'm actually in the process of working on a guide to help better explain the new error, and plan to get that out within the next few weeks.

Cheers,
Josh, AdWords API Team

Reply all
Reply to author
Forward
0 new messages