Skip to content

Commit

Permalink
Readme for policy violation exemptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Josecamero committed Nov 15, 2023
1 parent 31c343d commit 4683319
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,51 @@ const result = await customer.mutateResources(operations);

---

## Add Policy Exemption Rules

```ts
import {
resources,
enums,
toMicros,
ResourceNames,
MutateOperation,
} from "google-ads-api";

// Ad Group to which you want to add the keyword
const adGroupResourceName = 'customers/123/adGroups/456'

const keyword = '24 hour locksmith harlem'

const operations: MutateOperation<
resources.IAdGroupCriterion & { exempt_policy_violation_keys?: google.ads.googleads.v14.common.IPolicyViolationKey[]}
>[] = [
{
entity: 'ad_group_criterion',
operation: "create",
resource: {
// Keyword with policy violation exemptions
ad_group: adGroupResourceName,
keyword: {
text: '24 hour locksmith harlem',
match_type: enums.KeywordMatchType.PHRASE,
},
status: enums.AdGroupStatus.ENABLED ,
},
exempt_policy_violation_keys: [
{
policy_name: 'LOCAL_SERVICES',
violating_text: keyword,
},
],
}
];

const result = await customer.mutateResources(operations);
```

---

## Uploading Click Conversions

```ts
Expand Down

0 comments on commit 4683319

Please sign in to comment.