OTHERSCONTENT

Custom Search
Showing posts with label Google Ads Developer Blog. Show all posts
Showing posts with label Google Ads Developer Blog. Show all posts

Tuesday, 22 April 2014

Announcing v201403 of the DFP API

Today, we launch v201403 of the DFP API. This important release focuses our API by removing non-bulk methods and introduces some crowd favorite features like creating VAST video redirect creatives. A detailed list of these features and what’s changed can be found on our release notes page. Also, stay tuned for a special hangout on March 24th where we’ll go over all of these new features and discuss some common topics brought up on our forum.

Bulking up

Starting in v201403, we've removed all non-bulk methods from the API, such as OrderService.getOrder andLineItemService.createLineItem. The goal of this is to encourage you to think about your applications holistically. Instead of fetching a single order, sync orders regularly using lastModifiedDateTime and instead of creating or updating a single line item, group them together, e.g. create all orders first, then line items, and then creatives instead of one at a time.

If you do need to fetch a single object, we recommend following the pattern (in Java):

  // Create a statement to only select a single
  // order by ID.
  StatementBuilder statementBuilder =
      new StatementBuilder()
          .where("id = :id")
          .orderBy("id ASC")
          .limit(1)
          .withBindVariableValue("id", orderId);

  // Get the order.
  OrderPage page = orderService.
      getOrdersByStatement(statementBuilder.toStatement());

  Order order = Iterables.getOnlyElement(
      Arrays.asList(page.getResults()));
Notice that you can easily turn this into a function if needed, and possibly implement a caching mechanism.

Creating video creatives

This launch marks our first steps into opening up the writability of video creatives. We are starting withVastRedirectCreatives, video creatives that store the VAST 2 or 3 tag URL on an external server. All other types of video creatives are still read-only for now. We will be looking into opening more externally hosted video creatives in the coming versions and please do let us know what you are looking for on our forum.

ClientLogin gets the axe

You will notice that starting in v201403, you must use OAuth2 to authenticate with the API. Using ClientLogin will result in an error from our servers. We've modified all of our client libraries to throw exceptions if you are using ClientLogin with any non-compatible version. If you need a refresher on how to use OAuth2, see a guide for Java,PHP.NETPython, or Ruby.

Look out, deprecation ahead

We are getting closer to the deprecation of v201206, v201204, v201203, v201201, v201111, and v201108. These versions will be turned off on April 1st. If you have not yet, please upgrade to v201403 and OAuth2 as soon as possible. As a Java developer, you will also notice that v201403 is only available in the new Java client library and the old Java library will not receive any further feature enhancements.

As always, if you have any suggestions or questions about the new version, feel free to drop us a line on our Ads Developer Google+ page.

 - , DFP API Team

Announcing v201402 of AdWords API

Today we are announcing the AdWords API v201402. This latest release introduces support for Shopping campaigns, extensions to feed services, new reports, and more! We have also made most of the features previously marked as Beta available for everyone.

v201402 highlights:
Note: ClientLogin authorization protocol is deprecated and no longer supported in versions v201402 and later. You need to migrate to OAuth2 to be able to use AdWords API v201402 and access these new features.

If you are still using v201306 of the AdWords API, please note that it is being sunset on March 31st, 2014; we encourage you to skip v201309 and migrate straight to v201402. If you’re using v201309, be aware it is now marked deprecated and will be sunset on July 21st, 2014.

As with every new version of the AdWords API, we encourage you to carefully review all changes in the release notes and the v201402 migration guide. The updated client libraries and code examples will be published shortly. With this release, we have also updated the Required Minimum Functionality document to include some of the newly added features that are now required in third-party tools. If you have any questions or need help with migration, please post on the forum or the Ads Developers Plus Page.

Important updates for flexible conversion counting options in v201402 of AdWords API

We recently announced a new flexible conversion counting option feature in AdWords that may affect AdWords API v201309 users. There are a couple of additional changes in the AdWords API v201402 that we want to bring to your attention so you can take full advantage of this offering:
  • Record conversion values in conversion report columns based on the flexible conversion counting option
  • Retrieve and set flexible conversion counting options in the ConversionTracker
  • Adopt new conversion-related column names in the reports

Flexible conversion counting option

Since February 25th, 2014, AdWords users have been able to change the conversion counting option between All Conversions and Unique Conversions. The conversion counting option is defaulted to All Conversions - when left as the default option, your conversion related values in the reports will not change.

If the conversion counting option is changed from All Conversions to Unique Conversions, then the following conversion-related report columns will reflect the counting option selected across all reports:
  • ConversionsManyPerClick
  • ConversionRateManyPerClick
  • CostPerConversionManyPerClick
  • ValuePerConvManyPerClick
  • ValuePerConversionManyPerClick
  • ConversionManyPerClickSignificance
  • ConversionRateManyPerClickSignificance
  • CostPerConversionManyPerClickSignificance
Please see the help center article for specific examples of how counting Unique Conversions differs from counting All Conversions.

Retrieve and set flexible conversion counting options

In the AdWords API v201402, you will be able to retrieve and set the flexible conversion counting option. Please review the ConversionTracker API documentation to see the new flexible conversion counting options field namedcountingType.

New conversion-related column names

Conversion-related columns will have new names in reports. In AdWords API v201402:
  • The selector field names will remain the same
  • The display names and XML attribute names will be renamed
If you are downloading XML reports, you will need to update your client application to read the new column names.

Please see the migration guide for a mapping between old and new display names and XML attribute names.

If you have any questions about this upcoming change or anything else related to the AdWords API, please contact us on the AdWords API forum or via the Google Ads Developers Google+ page.

Reminder: New filter limits for Adwords API and scripts

As previously announcedAdWords API v201309 and AdWords scripts will start enforcing a limit of 10,000 matching values as arguments for the IN and NOT_IN operators starting March 31, 2014. This limit is currently enforced in AdWords API v201402.
You may be affected by this change if you construct large AWQL queries or selector predicates that have thousands of matching values using these operators in one of these use cases:
To make sure your applications and scripts work properly, check any code that constructs queries for reports or retrieve items using get or query methods and add necessary limit checks before March 31, 2014.
If you have any questions about this change, you can post them on AdWords API or Scripts developer forums.

New Statement Builder Features in the DFP .NET Library

Good news for .NET DFP developers - working with PQL just got easier. Additional features have just been added to the statement builder in the .NET client library. You can now use a more fluent interface to construct and modify PQL statements in parts. This allows for better query validation and code that's easier to construct: 

// Using the statement builder with the PQL service
StatementBuilder statementBuilder = new StatementBuilder()
    .Select("Id, Name")
    .From("Line_Item")
    .Where("isMissingCreatives = :isMissingCreatives")
    .OrderBy("id ASC")
    .Limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
    .AddValue("isMissingCreatives", true);

These changes also make modifying and reusing your statements much easier. For example, when paging through result sets you can update the offset without having to alter the entire query. This makes paging quick and easy. 

// Using the statement builder with getCreativesByStatement
StatementBuilder statementBuilder = new StatementBuilder()
    .Where("advertiser_id = :advertiserId")
    .OrderBy("id ASC")
    .Limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
    .AddValue("advertiserId", myAdvertiserId);

CreativePage page;
do {
  page = creativeService.getCreativesByStatement(
      statementBuilder.ToStatement());
  if(page.results != null)  {
    foreach (Creative creative in page.results) {
      Console.WriteLine("Creative ID: {0}", creative.id);
    }
  }
  statementBuilder.IncreaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT);
} while (statementBuilder.GetOffset() < page.totalResultSetSize);

Migration

If you're already using the statement builder, no immediate changes are needed. The previous functionality is still available, although it is now marked as obsolete.

The only pitfall comes with mixing functionality. If you set the statement builder's query directly, don't attempt to set parts of the query individually. Likewise, if you're building the query in parts, direct access is not allowed.

Stick with one usage or the other - mixing the two will give you an IllegalOperationException.

For more information, you can check out the out the source or examples. If you have any questions about the new statement builder features, feel free to ask us in the developer forum or on our Google+ Developers page.

Sunsetting CONVERSION DURATION THRESHOLD feed placeholder in AdWords API

Update: The sunset date was changed from April 7th, 2014 to April 28th, 2014. --Stan Grinberg

If you use AdWords call extensions, you know that you can count phone calls as conversions based on the duration of the call (e.g., 60 seconds). When using AdWords API feeds, this duration threshold is specified as theCONVERSION DURATION THRESHOLD placeholder. This placeholder is sunsetting on April 7th, 2014. You will not receive errors if you continue to read and set values associated with this placeholder. However, these values will not be honored past the sunset date.

How do I set conversion duration threshold in the future?
After the sunset date, if you’d like to continue using conversion duration threshold, then you must upgrade to the AdWords API v201402:
  • Use the ConversionTrackerService to create an AdCallMetricsConversion
  • Set the call duration threshold in the AdCallMetricsConversion.phoneCallDuration field
  • Use the new CONVERSION TYPE feed placeholder and setting the feed attribute value to the value of the newly created AdCallMetricsConversion.Id
Note: CONVERSION TYPE placeholder is not available for use at the time of this post. We will make a separate announcement when it’s ready.

What will happen to my existing conversion duration threshold values?
If you used CONVERSION DURATION THRESHOLD in a Feed Mapping prior to the sunset date, then we will automatically migrate those values after the sunset date - and they will be accessible via the AdWords API v201402 as follows:
  • New AdCallMetricsConversion will be automatically created for you with the existing conversion duration threshold.

    Note: If you have 3 feed items with call duration threshold, where two of them are set to 120 seconds, and one of them are set to 30 seconds, then only two AdCallMetricsConversion will be created - one with AdCallMetricsConversion.phoneCallDuration set to 120 seconds, and another one set to 30 seconds.
  • Feed attributes using CONVERSION DURATION THRESHOLD will remain, setting and reading those values will not throw errors. However, any associated feed attribute values will not be honored.
  • A new feed attribute will be automatically created in your existing feed, and it will be automatically be mapped to the new CONVERSION TYPE placeholder type
  • The new conversion type feed attribute will be associated to the newly createdAdCallMetricsConversion
Note that in order to get the name and field attribute ID of the newly created conversion type field attribute, you should use the FeedMappingService to determine the feed attribute ID that is associated with theCONVERSION TYPE placeholder type.

If you have any questions about this upcoming change or anything else related to the AdWords API, please contact us on the AdWords API forum or via the Google Ads Developers Google+ page.

Upcoming changes to call conversion settings in AdWords scripts

We recently announced the following changes to call metrics with call extensions in AdWords:
  • Call conversion tracking will be disabled by default starting March 3, 2014
  • Call conversion duration threshold will be sunset on April 7, 2014
Since these changes are incompatible with AdWords scripts, we have deprecated the following methods related to these features in AdWords scripts:
These methods will be sunset on April 7, 2014. To make sure your scripts work properly, check any code that uses these methods, and fix them before April 7, 2014.

If you have questions or feedback about this change, let us know on our forum. You can also follow our Google+page for updates about the AdWords scripts.

A new way to access our Ads SOAP APIs through Python

The Ads APIs Python client library, adspygoogle, has been around for quite some time, supporting versions of Python as old as 2.4 but capping out at 2.7. We’ve been getting more and more feedback recently that our users want Python 3 support. Also, many of adspygoogle’s dependencies are dated and no longer officially supported. We heard you, and with these items in mind...
A New Client Library
A completely new client library — googleads — is now available for Python 3 as well as Python 2.7. The new library has several advantages over our existing library:
  • Most of your code from the previous Python library will work with minimal modifications, listed below and in our migration guide.
  • The dependencies are all hosted on PyPI, so you do not need to use the --allow-external or --allow-unverified flags at install.
  • The constructors and attributes in the new library give you more control over client objects; for example, you can easily switch out OAuth 2.0 credentials and manage multiple accounts.
  • Data types are retained. Whereas adspygoogle uses strings for everything, googleads can send and receive numbers, booleans, datetimes, etc.
  • The library is more integrated with the Python standard library; for example, you can use the built-in logging framework to log SOAP messages.
  • The library is built on top of a fork of suds and allows users who are familiar with suds to take advantage of that library’s features.
Migrating to the New Client Library
Existing Python users can retain almost all of their logic working with the objects defined in our APIs. An important difference is that your responses from the API are now objects returned by suds instead of dictionaries. The objects support using dictionary syntax to retrieve values but you cannot use dictionary methods on them. Most importantly, this means that .get() and .update() are no longer supported. Where in adspygoogle you may have done this:
response = inventory_service.GetAdUnitsByStatement(statement.ToStatement())[0] ad_units = response.get('results')
You will now need to do this:
response = inventory_service.getAdUnitsByStatement(statement.ToStatement()) ad_units = response['results'] if 'results' in response else None
Some more minor changes that need to be made include changing your code to use the new methods for instantiating client and service objects and using the exact method names from our APIs, which are generally lower camel case.
For more information on migration, check out the migration guide we have posted in the new library’s wiki section.
The googleads library will be the primary focus of development moving forward. The existing adspygooglelibrary is now in maintenance mode but we will continue to add support for new AdWords and DFP API releases through December, 2014.
If you find any bugs, have a patch to contribute or just a feature request, please feel free to file an issue on theissue tracker.

Reminder: AdWords API v201306 and Ad Exchange Buyer SOAP API v201306 to be sunset on March 31

As we have previously announced, if you're using the AdWords API or Ad Exchange Buyer SOAP API v201306, please note that support for this version will end on March 31st, 2014. If you are still using v201306 after that date, all requests will fail and your application will cease working until you migrate to a supported version. You can reference either the v201309 or v201402 migration guides for help upgrading to one of these versions.

In addition, remember that ClientLogin support is deprecated and you will have to migrate to OAuth 2.0 in order to authenticate starting in version v201402. It may be best to get this out of the way now, because with the sunset of v201309 on July 21st, 2014, all support for ClientLogin will go away and OAuth 2.0 will be required to access the API. Please reference our OAuth 2.0 migration guide for help with this process.

If you have any questions about this upcoming change or anything else related to the AdWords API, please contact us on the forum or via our Google+ page.

Introducing a new type of feed for AdWords API: Review extensions

Review extensions, which let you show accolades from reputable third parties right in your search ads, wereintroduced last year. We have now made this feature available for the AdWords API in v201402.

Creating review extensions is the same as creating sitelinks as described in this guide. The only differences are:
  • The different placeholderId for FeedMappingService. As shown in the feed placeholders page, the placeholderId for review extensions is 8.
  • A different set of Feed attributes for FeedService. A review extension consists of four attributes:
    • Text (String): Either an exact quote or paraphrase from a third-party source that appears beneath your ad
    • Source (String): Name of the third-party publisher of the quoted or paraphrased review you’re using in your review extension
    • Source URL (URL): Landing page of the third-party website where the quoted or paraphrased review is located
    • Format (Boolean): Indicates whether your review is formatted as an exact quote from the third-party source, or if you’re paraphrasing. Setting to true means your review is formatted as an exact quote, false means paraphrasing.
Here is the Java code to create a Feed for review extensions. Code examples in other programming languages are available as part of the client libraries.
FeedAttribute textAttribute = new FeedAttribute();
textAttribute.setType(FeedAttributeType.STRING);
textAttribute.setName("Text");

FeedAttribute sourceNameAttribute = new FeedAttribute();
sourceNameAttribute.setType(FeedAttributeType.STRING);
sourceNameAttribute.setName("Source Name");

FeedAttribute sourceUrlAttribute = new FeedAttribute();
sourceUrlAttribute.setType(FeedAttributeType.URL);
sourceUrlAttribute.setName("Source URL");

FeedAttribute exactlyQuotedAttribute = new FeedAttribute();
exactlyQuotedAttribute.setType(FeedAttributeType.BOOLEAN);
exactlyQuotedAttribute.setName("Exactly Quoted");

Feed reviewExtensionFeed = new Feed();
reviewExtensionFeed.setName("Feed For ReviewExtension from API");
reviewExtensionFeed.setAttributes(
    new FeedAttribute[] {textAttribute, sourceNameAttribute,
    sourceUrlAttribute, exactlyQuotedAttribute});
If you have any questions about this feature or the AdWords API in general, you can post them on the developer forum. You can also follow the Google+ page for updates about the AdWords API.

New feed-based location extensions in v201402 of AdWords API

As previously announced, AdWords API v201402 lets you manage your upgraded, feed-based location extensions in addition to your campaign location extensions. Upgraded location extensions are linked to your Google Places for Business account and offer significant benefits over manually entered location extensions. Most importantly, once you configure your upgraded location extensions you don't have to worry about keeping them up to date with changes in your Google Places for Business account -- AdWords does it for you!

As mentioned in our detailed guide to upgraded location extensions, you can use the AdWords API to set up your extensions in a few easy steps:
There are a few key differences between feeds with systemFeedGenerationData ("location feeds") and other feeds you may have created for sitelinks, app or call extensions.

Type or Attribute
Location Feeds
Other Feeds
Required

Defines the link between your AdWords and Places for Business accounts.
Not applicable
Not applicable

AdWords maintains the feed item attribute -> placeholder field relationship for you.
Required

You maintain the feed item attribute -> placeholder field relationship.
Automatically managed by AdWords.
Maintained by you via the FeedItemService
Required
Not applicable
Optional

Only needed if you want more control over which businesses from your Places account are used for location extensions on a particular Campaign.
Required
Optional
Optional
Only needed if you want more control over which businesses from your Places account are used for location extensions on a particular AdGroup.

Just as for other feed types, you can get stats for a location feed's extensions from thePLACEHOLDER_FEED_ITEM report.

This is just a quick overview of the AdWords API support for upgraded location extensions. For more information, check out our feed services guide for location extensions and the accompanying code sample in each client library (JavaPerlPHPPythonRuby.NET).

Still have questions? Feel free to visit us on the AdWords API Forum or our Google+ page.