Tag Archives: adwords_scripts

Support for shared negatives in AdWords Scripts

AdWords Scripts now support negative keyword and excluded ad placement lists, and the ability to share them across campaigns. Follow these links for implementation details and code examples: We have also released a new solution named Master Negative List that uses this feature to maintain a master list of negative keywords and placements for AdWords accounts. The list of negative criteria can be managed from a spreadsheet. Separate versions are available for AdWords accounts and manager accounts.

Special thanks goes to Terence Nip, who implemented this feature during his summer internship at Google.

Give this feature a try and let us know what you think! You can post your questions and feedback on our developer forum.

New features in AdWords Scripts

We have made the following changes to AdWords scripts.

Full screen mode for Scripts IDE

You can now toggle fullscreen mode for the Scripts IDE by clicking the Expand icon on the top right corner of the editor toolbar.


Clear methods for Upgraded URLs

We have added new methods to clear various fields in Upgraded URLs: Clear methods for sitelink descriptions

You can now use the clearDescription1() and clearDescription2() methods to clear the corresponding description fields in the Sitelink, AdGroupSitelink and CampaignSitelink classes.

Sunset support for updating destination URL

As previously announced, support for updating destination URL has been sunset completely. If any of your scripts use this field, make sure you upgrade your scripts to use the upgraded URL fields. We have also added clearDestinationUrl() to the Keyword class and clearLinkUrl() to various ad extension classes. These methods may be used to clear the destination URL field when you upgrade your URLs.

See our sunset tracker page for more details.

If you have any questions about this feature or AdWords scripts in general, you can post them on our developer forum.

Upcoming changes to Paid and Organic Query report

We are updating the Paid and Organic report to include only text ad statistics. Impressions and clicks for mobile app install ads and Product Listing Ads will be excluded from this report starting July 13, 2015.

These formats serve in places other than on search results, so we are excluding them to provide you a better comparison across paid and organic listings at the query level. If you use data from the Paid and Organic report in any of your AdWords API or Scripts applications, then make sure you update them to adjust for this data change. Historic stats for mobile app install ads and Product Listing Ads will continue to be available from this report type up to the following report dates:
  • Product Listing Ads - up to and including March 23, 2015
  • Mobile app install ads - up to and including July 13, 2015
If you have any further questions about this change, let us know via the API or scripts forum, or Google+ page.

New features in AdWords scripts

We have made the following changes to AdWords scripts.

Support for passing arguments into parallel functions

You can now use a string argument to pass account-specific information into a parallel function when using the MccApp.executeInParallel() method. The code snippet below shows how to use this feature:

function main() {
// Select the accounts you want to process.
var accountSelector = MccApp.accounts().withIds([1234567890, 3456787890]);

// Construct a config object that contains account-specific information.
var accountFlags = {
'1234567890': {
'label': 'Brand 1 campaigns',
},
'3456787890': {
'label': 'Brand 2 campaigns',
}
};

// Convert the config object into a string.
var optionalInput = JSON.stringify(accountFlags);

// Process accounts in parallel.
accountSelector.executeInParallel("processClientAccount",
"afterProcessAllClientAccounts", optionalInput);
}

function processClientAccount(args) {
// Convert the account flags from string to config object.
var accountFlags = JSON.parse(args);
var accountConfig =
accountFlags[AdwordsApp.currentAccount().getCustomerId()];

// Process your client account here.
var label = accountConfig['label'];
...
}

function afterProcessAllClientAccounts(results) {
...
}
Learn more about working on accounts in parallel.

Support for clearing ad group bid modifiers

You can now use the clearMobileBidModifier() method of AdGroup to clear bid modifiers at the ad group level and default to the campaign-level bid modifier.

Support for Upgraded URLs in app extensions

We have added support for Upgraded URLs in app extensions. The setLinkUrl() method in MobileApp, AccountMobileApp, CampaignMobileApp and AdGroupMobileApp classes and withLinkUrl() method of MobileAppBuilder class have been marked deprecated and will start throwing user errors on July 1, 2015. If you use any of these methods in your script, make sure you update them to use the setFinalUrl() / withFinalUrl() methods instead.

Deprecated CallOnly field in phone extensions

We have deprecated the call-only field in phone extensions. The following methods have been marked as deprecated and will start throwing user errors on June 14, 2015: If your ad extensions use the call-only feature, migrate your campaigns to call-only campaigns by following the instructions here.

Transition to viewable cost-per-thousand impression (CPM)

We’d like to remind you that later this year, all cost-per-thousand impression (CPM) bids will transition to a new type of bid called viewable CPM (vCPM), and CPM bidding will no longer be available. You can learn more about vCPM on our help center.

AdWords scripts already use the correct CPM version, based on campaign settings, so no code changes are required from your end for this transition. Our updated documentation now refers to CPM as the generic cost-per-thousand impression bidding instead of a specific flavor (e.g., maxCPM or vCPM).

If you have any questions about these changes or AdWords scripts in general, you can post them on our developer forum.

Register now for the AdWords scripts workshops!

We’re pleased to announce the first ever workshops for AdWords scripts. The workshops will be held at the following locations:

        New York: June 29th, 2015
        San Francisco: July 10th, 2015

This round of workshops will cater to both beginners and advanced scripters. We'll have code labs where you will build your own scripts from scratch, with the help from the Scripts team. Bring your laptop and an idea to get it scripted!

Whether you’re an advertiser who wants to learn about how scripts can automate your account management tasks, a developer who wants to polish your scripting skills, or a scripts enthusiast who wants to meet fellow scripts experts, you can find it all in these workshops.

Visit our website to check out the full agenda and sign up.

If you have any questions about the workshops, you can post them on our forums. Check out our Google+ page for Ads APIs updates.

New features and guides in AdWords scripts

Shopping Content API
AdWords scripts now support Google Shopping Content API which gives Google Merchant Center users the ability to upload and manage their product listings and manage their Merchant Center accounts. The Shopping Content API can be enabled through the Advanced APIs dialog. See our guide and code snippets to learn more about this feature.

Account level extensions
AdWords scripts now support account-level extensions: AccountCallout, AccountMobileApp, and AccountReview. You can access these extensions using the extensions() method of the Account object. Appropriate creation and deletion methods are also available for these extensions on the Account object. See our guide for more details and usage examples.

Resolve geo names in reports
The AdWordsApp.report() method now supports an option named resolveGeoNames, which controls whether or not to convert Geo Criteria IDs (e.g., CountryCriteriaId or CityCriteriaId) into names ('United States', 'San Francisco', etc.). Set this option to true to get names, false to get numerical IDs. This option defaults to true.

Updated best practices guide
We have updated the best practices guide to cover a lot of common performance issues that your scripts may run into, and how to improve them.

New weather-based management script
The new weather-based management script improves upon the the popular bid-by-weather script by providing a framework where you can add your own campaign management logic.

If you have any questions about these features or AdWords scripts in general, you can post them on our developer forum.

New features in AdWords Scripts

We are excited to announce two new features for AdWords scripts:

AdWords API v201502 reports

AdWords scripts now support AdWords API v201502 reports. The new version introduces two new reports: USER_AD_DISTANCE_PERFORMANCE_REPORT and LABEL_REPORT. We also introduced several new columns, renamed some columns to make them consistent with the AdWords UI, and removed some duplicate columns. See the AdWords API release notes for more details.

If you use API versioning in your reports, you’ll need to modify your code to use v201502 as shown:

var report = AdWordsApp.report(query, {
apiVersion: 'v201502'
});
If you don’t use API versioning, your scripts will now default to v201502 reports. If your scripts access one of the removed or renamed columns, you may need to fix that column name in your scripts.

JDBC

JDBC allows your scripts to connect to external databases through the JDBC service, a wrapper around the standard Java Database Connectivity technology. In Apps Script, the JDBC service supports Google Cloud SQL, MySQL, Microsoft SQL Server, and Oracle databases. See our guide for more details.

If you have any questions about these features or AdWords scripts in general, you can post them on our developer forum.

Support for Upgraded URLs in AdWords Scripts

AdWords scripts now support Upgraded URLs. Upgraded URLs provide a smarter way for you to manage URLs in AdWords by specifying which part of your URL specifies the landing page, and which part is used for tracking. You can learn more about this feature here.

Here is an example of how to create a new text ad that specifies the final URL instead of destination URL:

var adOperation = adGroup.newTextAdBuilder()
.withHeadline("headline of ad")
.withDescription1("first line of ad description")
.withDescription2("second line of ad description")
.withDisplayUrl("www.example.com")
.withFinalUrl("http://www.example.com")
.build();
var ad = adOperation.getResult();
You can retrieve the Upgraded URL fields of an entity using the urls() method for that entity. If you run reports, the Upgraded URL fields are also available through various performance reports.

Migrating to Upgraded URLs

We encourage all advertisers to upgrade to the new system by July 1, 2015. This involves two parts:
  1. Update your scripts to handle Upgraded URL fields.
  2. Migrate the existing entities in your accounts to Upgraded URLs.
Upgrade scripts

For any new entities that you create using AdWords scripts, we recommend that you set the final URLs instead of destination URLs.

When dealing with existing entities, keep in mind that you may encounter both upgraded and non-upgraded entities in your accounts. If your script reads destination URLs, then make sure it checks both the destination URL and final URL fields of any entity it retrieves. If your script updates destination URLs, use either setFinalUrl() or setDestinationUrl(), depending on whether the entity has been upgraded or not. AdWords scripts will raise an error if you attempt to set both final URL and destination URL for an entity.

Migrate existing entities

You should migrate existing entities to use Upgraded URLs by 1 July, 2015. Refer to our migration guide for upgrading your existing entities to the new URL framework. If you wish to use the Basic upgrade option, you can use the bulk upload feature. If you choose to use the Advanced upgrade option, then you can use Scripts.

If you choose not to upgrade now, and your destination URL does not contain a different domain than the display URL, your destination URL will be updated automatically starting on 1 July 2015. If your destination URL does contain a different domain than the display URL, you will need to manually upgrade the URL or the ad will stop serving shortly after the July 1 deadline.

If you have questions or feedback about these features, let us know on our forum.

New features in AdWords scripts

We have added the following new features in AdWords scripts.

Bidding

You can now manage bids for your campaigns, ad groups and criteria in AdWords scripts. Support is also provided to retrieve and update shared bidding strategies in your account. The current release allows you to use MANUAL_CPC, MANUAL_CPM, BUDGET_OPTIMIZER or CONVERSION_OPTIMIZER as bidding strategies; and set CPC, CPM or CPA bids to your biddable entities. See our guide and code snippets to learn more about this feature.

Display criteria

You can now manage the following display criteria through AdWords scripts: keywords, placements, topics, audiences. Check out our code snippets for usage examples.

New ad extensions

You can now manage review and callout extensions for your campaigns and ad groups in AdWords scripts.

If you have questions or feedback about these features, let us know on our forum.

Bulk Upload in AdWords Scripts

AdWords scripts now support bulk changes to your account through uploading data in CSV format. You can upload data from a CSV file on Google Drive, a Google spreadsheet, a Microsoft Excel spreadsheet, or construct a bulk upload request in your script at runtime.

AdWords scripts currently support the following operations for bulk upload:
  • Campaign management: You can create, edit or delete campaigns, ad groups, keywords and text ads using bulk upload. You can also edit existing ad group criteria, ads and product groups.
  • Offline conversions: You can upload offline conversions to your account using bulk upload.
Learn more about this feature on our guide, and check out our code snippets for usage examples. If you have questions or feedback about this feature, let us know on our forum.