ImageAdExtension Data Object - Campaign Management

Defines an ad extension that specifies an image with alternative text to include in an expanded text ad.

You can associate an image ad extension with the account or with campaigns and ad groups in the account. For each account, only 1,000 campaigns and 1,000 ad groups can be associated with image ad extensions. Each entity (account, campaign, or ad group) can be associated with up to 6 image ad extensions.

Syntax

<xs:complexType name="ImageAdExtension" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexContent mixed="false">
    <xs:extension base="tns:AdExtension">
      <xs:sequence>
        <xs:element minOccurs="0" name="AlternativeText" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="Description" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="DestinationUrl" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="DisplayText" nillable="true" type="xs:string">
          <xs:annotation>
            <xs:appinfo>
              <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" name="FinalAppUrls" nillable="true" type="tns:ArrayOfAppUrl" />
        <xs:element xmlns:q43="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="FinalMobileUrls" nillable="true" type="q43:ArrayOfstring" />
        <xs:element minOccurs="0" name="FinalUrlSuffix" nillable="true" type="xs:string" />
        <xs:element xmlns:q44="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="FinalUrls" nillable="true" type="q44:ArrayOfstring" />
        <xs:element xmlns:q45="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="ImageMediaIds" nillable="true" type="q45:ArrayOflong" />
        <xs:element minOccurs="0" name="Images" nillable="true" type="tns:ArrayOfAssetLink">
          <xs:annotation>
            <xs:appinfo>
              <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element xmlns:q46="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="Layouts" nillable="true" type="q46:ArrayOfstring">
          <xs:annotation>
            <xs:appinfo>
              <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" name="SourceType" nillable="true" type="xs:string">
          <xs:annotation>
            <xs:appinfo>
              <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" name="TrackingUrlTemplate" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="UrlCustomParameters" nillable="true" type="tns:CustomParameters" />
      </xs:sequence>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

Elements

The ImageAdExtension object has the following elements: AlternativeText, Description, DestinationUrl, DisplayText, FinalAppUrls, FinalMobileUrls, FinalUrls, FinalUrlSuffix, ImageMediaIds, Images, Layouts, SourceType, TrackingUrlTemplate, UrlCustomParameters.

Element Description Data Type
AlternativeText Alternative description of the image media for usability. If the image could not be displayed, the alternative text is used instead.

The maximum length for this element is 35 characters.

Add: Required
Update: Required
string
Description Description that can be used by the advertiser, agency, or account manager to track, label, or manage image media.

This description is not displayed with the ad or image.

The maximum length for this element is 100 characters.

Add: Optional
Update: Optional. If you set this element null, the previous setting will be deleted.
string
DestinationUrl The URL of the webpage to take the user to when they click the image.

The URL can contain dynamic text strings such as {keyword}. For more information, see What tracking or URL parameters can I use?.

The URL can contain a maximum of 1,024 characters. If the URL does not specify a protocol, the system uses the HTTP protocol when a user clicks the ad. If the URL specifies the HTTP protocol when you add an ad, the service will remove the http:// protocol string (the HTTP protocol string does not count against the 1,024 character limit); however, the service will not remove an HTTPS protocol string (https://) from the URL.

If the URL is not specified for the image ad extension, the URL of the ad is used.

Add: Optional
Update: Optional. If you set this element null, the previous setting will be deleted.
string
DisplayText The display text of your image extension.

The maximum length for this element is 35 characters.

Add: Required when Layouts contains SearchMultiple, else Optional.
Update: Required when Layouts contains SearchMultiple, else Optional. If you set this element null, the previous setting will be deleted.
string
FinalAppUrls For future use. AppUrl array
FinalMobileUrls The landing page URL for mobile devices.

The following validation rules apply to Final URLs and Final Mobile URLs.
- The length of the URL is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.
- You may specify up to 10 list items for both FinalUrls and FinalMobileUrls; however, only the first item in each list is used for delivery. The service allows up to 10 list items for potential forward compatibility.
- Usage of '{' and '}' is only allowed to delineate tags, for example {lpurl}.
- Final URLs must each be a well-formed URL starting with either http:// or https://.
- If you specify FinalMobileUrls, you must also specify FinalUrls.
- You may not specify FinalMobileUrls if the DevicePreference is set to 30001 (mobile).

Add: Optional
Update: Optional. If no value is set for the update, the prior setting is removed.
string array
FinalUrls The landing page URL.

The following validation rules apply to Final URLs and Final Mobile URLs.
- The length of the URL is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.
- You may specify up to 10 list items for both FinalUrls and FinalMobileUrls; however, only the first item in each list is used for delivery. The service allows up to 10 list items for potential forward compatibility.
- Usage of '{' and '}' is only allowed to delineate tags, for example {lpurl}.
- Final URLs must each be a well-formed URL starting with either http:// or https://.
- If you specify FinalMobileUrls, you must also specify FinalUrls.
- You may not specify FinalMobileUrls if the DevicePreference is set to 30001 (mobile).

Add: Optional
Update: Optional. If no value is set for the update, the prior setting is removed.
string array
FinalUrlSuffix The final URL suffix can include tracking parameters that will be appended to the end of your landing page URL. We recommend placing tracking parameters that your landing page requires in a final URL suffix so that your customers are always sent to your landing page. For more details and validation rules see Final URL Suffix in the technical guides.

This feature is only available for customers in the Final URL Suffix Phase 3 pilot (GetCustomerPilotFeatures returns 636). If you are not in the pilot this property will be ignored and no error will be returned.

Add: Optional
Update: Optional. If no value is set for the update, the prior setting is removed.
string
ImageMediaIds The identifiers of the images to include in the ad. You may not specify media identifiers for more than one image of the same aspect ratio. In other words each of the referenced images must have different aspect ratios.

You can specify up to four (4) image media identifiers. While the minimum required is one image media ID, in order to qualify for all ad placements you must provide four image media identifiers, where each ID corresponds to an Image of one of the four supported Media types (aspect ratios). The supported aspect ratios for audience ads are 16:9, 1.5:1, 4:3, and 1.2:1. For more information see the Image data object reference documentation.

You can get the identifier of each Image when you add them to the image library by calling the AddMedia operation. Otherwise after the media has been added to your image library you can get the media identifiers with the GetMediaMetaDataByAccountId operation.

Add: Required
Update: Required
long array
Images Image assets with different sizes and aspect ratios so they can flexibly display across a variety of publishers and placements.

Include one or more AssetLink objects that each contain an ImageAsset with SubType and crop settings that match the desired aspect ratio.

Add: Required
Update: Optional. If no value is set for the update, this setting is not changed. If you include images during update, any previously set images will be replaced.
AssetLink array
Layouts The list of eligible image layouts.

Supported values are SearchSingle and SearchMultiple. New layouts might be added in the future, so you should not take any dependency on a fixed set of values.

Add: Required
Update: Optional. If no value is set for the update, this setting is not changed. If you include layouts during update, any previously set layouts will be replaced.
string array
SourceType The source type. string
TrackingUrlTemplate The tracking template to use as a default for all FinalUrls and FinalMobileUrls.

The following validation rules apply to tracking templates. For more details about supported templates and parameters, see the Microsoft Advertising help article What tracking or URL parameters can I use?
- Tracking templates defined for lower level entities e.g. ads override those set for higher level entities e.g. campaign. For more information, see Entity Limits.
- The length of the tracking template is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.
- The tracking template must be a well-formed URL beginning with one of the following: http://, https://, {lpurl}, or {unescapedlpurl}.
- Microsoft Advertising does not validate whether custom parameters exist. If you use custom parameters in your tracking template and they do not exist, then the landing page URL will include the key and value placeholders of your custom parameters without substitution. For example, if your tracking template is https://tracker.example.com/?season={_season}&promocode={_promocode}&u={lpurl} and neither {_season} or {_promocode} are defined at the campaign, ad group, criterion, keyword, or ad level, then the landing page URL will be the same.

Add: Optional
Update: Optional. If no value is set for the update, the prior setting is removed.
string
UrlCustomParameters Your custom collection of key and value parameters for URL tracking.

Microsoft Advertising will accept the first 3 CustomParameter objects that you include within the CustomParameters object, and any additional custom parameters will be ignored. Each CustomParameter includes Key and Value elements. For customers in the Custom Parameters Limit Increase Phase 3 pilot (GetCustomerPilotFeatures returns 635), Microsoft Advertising will accept the first 8 custom parameter key and value pairs that you include, and if you include more than 8 custom parameters an error will be returned.

Add: Optional
Update: Optional. If no value is set for the update, the prior setting is removed.
CustomParameters

The ImageAdExtension object has Inherited Elements.

Inherited Elements

Inherited Elements from AdExtension

The ImageAdExtension object derives from the AdExtension object, and inherits the following elements: DevicePreference, ForwardCompatibilityMap, Id, Scheduling, Status, Type, Version. The descriptions below are specific to ImageAdExtension, and might not apply to other objects that inherit the same elements from the AdExtension object.

Element Description Data Type
DevicePreference Not supported for this ad extension type. long
ForwardCompatibilityMap The list of key and value strings for forward compatibility to avoid otherwise breaking changes when new elements are added in the current API version.

There are currently no forward compatibility changes for the AdExtension object.

Add: Read-only
Update: Read-only
KeyValuePairOfstringstring array
Id The unique Microsoft Advertising identifier of the ad extension.

Add: Read-only
Update: Read-only and Required
long
Scheduling Determines the calendar day and time ranges when the ad extension is eligible to be shown in ads.

Add: Optional
Update: Optional. If you set this element null, any existing scheduling set for the ad extension will remain unchanged. If you set this to any non-null Schedule object, you are effectively replacing existing scheduling settings for the ad extension. To remove all scheduling set this element to an empty Schedule object.
Schedule
Status The status of the ad extension. The value will always be Active because the Campaign Management service does not return deleted ad extensions.

Add: Read-only
Update: Read-only
AdExtensionStatus
Type The type of the ad extension. This value is ImageAdExtension when you retrieve an image ad extension.

Add: Read-only
Update: Read-only

For more information about ad extension types, see the Ad Extension Data Object Remarks.
string
Version Tracks the number of times the ad extension has been updated.

The version is set to 1 when the ad extension is created, and increments by one after each update.

Add: Not allowed
Update: Not allowed
int

Requirements

Service: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13