Tuesday, March 11, 2014

Google Ads Developer Blog

Google Ads Developer Blog


Sunsetting CONVERSION DURATION THRESHOLD feed placeholder in AdWords API

Posted: 10 Mar 2014 12:37 PM PDT

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 the CONVERSION 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 created AdCallMetricsConversion
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 the CONVERSION 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.

New Statement Builder Features in the DFP .NET Library

Posted: 10 Mar 2014 07:37 AM PDT

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.

No comments:

Post a Comment