ディスプレイ ネットワーク用レスポンシブ広告

ディスプレイ ネットワーク用レスポンシブ広告では、Google ディスプレイ ネットワークの広告枠に合わせて広告のサイズ、表示形式、フォーマットが自動的に調整されます。

ResponsiveDisplayAd は、マーケティング画像や短い広告見出し、長い広告見出し、広告文、任意で追加できる名前とロゴのフィールドで構成されます。それぞれの詳細についてはこちらをご覧ください。

レスポンシブ広告の作成プロセスは次の 2 段階に分かれています。

  1. MediaServiceupload() メソッドを使って、マーケティング画像をアップロードします。返された ID は後で広告を追加する際に必要になりますので、メモしておいてください。必要に応じて、ロゴ画像も同じ方法でアップロードできます。このメディア サービスを介してアップロードされた画像は、後で複数の広告で再利用することが可能です。

  2. AdGroupAdService を使って ResponsiveDisplayAd を作成します。marketingImagelogoImage については、第 1 段階で返されたメディア ID を参照してください。

それでは、ディスプレイ ネットワークを対象とするキャンペーンに画像を追加した例を見てみましょう。以下は火星旅行に関する画像の例で、レスポンシブ広告の画像の仕様を満たしています。

Java

public static void runExample(
    AdWordsServices adWordsServices, AdWordsSession session, long adGroupId) throws Exception {
  // Get the MediaService.
  MediaServiceInterface mediaService = adWordsServices.get(session, MediaServiceInterface.class);

  // Create image.
  Image image = new Image();
  image.setType(MediaMediaType.IMAGE);
  image.setData(
      com.google.api.ads.common.lib.utils.Media.getMediaDataFromUrl("https://goo.gl/3b9Wfh"));

  // Upload image.
  image = (Image) mediaService.upload(new Media[] {image})[0];

  // Get the AdGroupAdService.
  AdGroupAdServiceInterface adGroupAdService =
      adWordsServices.get(session, AdGroupAdServiceInterface.class);

  // Create a responsive display ad.
  ResponsiveDisplayAd responsiveDisplayAd = new ResponsiveDisplayAd();

  // This ad format does not allow the creation of an image using the
  // Image.data field. An image must first be created using the MediaService,
  // and Image.mediaId must be populated when creating the ad.
  Image marketingImage = new Image();
  marketingImage.setMediaId(image.getMediaId());
  responsiveDisplayAd.setMarketingImage(marketingImage);

  responsiveDisplayAd.setShortHeadline("Travel");
  responsiveDisplayAd.setLongHeadline("Travel the World");
  responsiveDisplayAd.setDescription("Take to the air!");
  responsiveDisplayAd.setBusinessName("Interplanetary Cruises");
  responsiveDisplayAd.setFinalUrls(new String[] {"http://www.example.com/"});

  // Create ad group ad for the responsive display ad.
  AdGroupAd expandedTextAdGroupAd = new AdGroupAd();
  expandedTextAdGroupAd.setAdGroupId(adGroupId);
  expandedTextAdGroupAd.setAd(responsiveDisplayAd);

  // Optional: set the status.
  expandedTextAdGroupAd.setStatus(AdGroupAdStatus.PAUSED);

  // Create the operation.
  AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation();
  adGroupAdOperation.setOperand(expandedTextAdGroupAd);
  adGroupAdOperation.setOperator(Operator.ADD);

  // Make the mutate request.
  AdGroupAdReturnValue result =
      adGroupAdService.mutate(new AdGroupAdOperation[] {adGroupAdOperation});

  // Display ads.
  for (AdGroupAd adGroupAdResult : result.getValue()) {
    ResponsiveDisplayAd newAd = (ResponsiveDisplayAd) adGroupAdResult.getAd();
    System.out.printf(
        "Responsive display ad with ID %d and short headline '%s' was added.%n",
        newAd.getId(), newAd.getShortHeadline());
  }
}

Visual Basic

' Get the AdGroupAdService.
Dim adGroupAdService As AdGroupAdService = CType(user.GetService( _
    AdWordsService.v201609.AdGroupAdService), AdGroupAdService)

' Get the MediaService.
Dim mediaService As MediaService = CType(user.GetService( _
    AdWordsService.v201609.MediaService), MediaService)

Try
  ' Create the image.
  Dim image As New Image()
  image.data = MediaUtilities.GetAssetDataFromUrl("https://goo.gl/3b9Wfh", user.Config)
  image.type = MediaMediaType.IMAGE

  ' Upload the image.
  Dim newImage As Image = CType(mediaService.upload(New Media() {image})(0), Image)

  ' Create a responsive display ad.
  Dim responsiveDisplayAd As New ResponsiveDisplayAd()

  ' This ad format does not allow the creation of an image using the
  ' Image.data field. An image must first be created using the MediaService,
  ' and Image.mediaId must be populated when creating the ad.
  responsiveDisplayAd.marketingImage = New Image()
  responsiveDisplayAd.marketingImage.mediaId = newImage.mediaId

  responsiveDisplayAd.shortHeadline = "Travel"
  responsiveDisplayAd.longHeadline = "Travel the World"
  responsiveDisplayAd.description = "Take to the air!"
  responsiveDisplayAd.businessName = "Google"
  responsiveDisplayAd.finalUrls = New String() {"http://www.example.com"}

  ' Create ad group ad.
  Dim adGroupAd As New AdGroupAd()
  adGroupAd.adGroupId = adGroupId
  adGroupAd.ad = responsiveDisplayAd
  adGroupAd.status = AdGroupAdStatus.PAUSED

  ' Create operation.
  Dim operation As New AdGroupAdOperation()
  operation.operand = adGroupAd
  operation.operator = [Operator].ADD

  ' Make the mutate request.
  Dim result As AdGroupAdReturnValue = adGroupAdService.mutate( _
      New AdGroupAdOperation() {operation})

  ' Display results.
  If (Not result Is Nothing) AndAlso (Not result.value Is Nothing) Then
    For Each newAdGroupAd As AdGroupAd In result.value
      Dim newAd As ResponsiveDisplayAd = CType(newAdGroupAd.ad, ResponsiveDisplayAd)
      Console.WriteLine("Responsive display ad with ID '{0}' and short headline '{1}'" & _
          " was added.", newAd.id, newAd.shortHeadline)
    Next
  Else
    Console.WriteLine("No responsive display ads were created.")
  End If
Catch e As Exception
  Throw New System.ApplicationException("Failed to create responsive display ads.", e)
End Try

Python

def main(client, ad_group_id):
  # Initialize appropriate services.
  ad_group_ad_service = client.GetService('AdGroupAdService', version='v201609')
  media_service = client.GetService('MediaService', version='v201609')

  try:
    # Create image.
    opener = urllib2.build_opener(*client.proxy_config.GetHandlers())
    image_data = base64.b64encode(opener.open('https://goo.gl/3b9Wfh').read())
    image = {
        'type': 'IMAGE',
        'data': image_data,
        'xsi_type': 'Image'
    }

    # Make the upload request
    image = media_service.upload(image)[0]

    # Create a responsive display ad.
    operations = [{
        'operator': 'ADD',
        'operand': {
            'xsi_type': 'AdGroupAd',
            'adGroupId': ad_group_id,
            'ad': {
                'xsi_type': 'ResponsiveDisplayAd',
                'marketingImage': {'mediaId': image['mediaId']},
                'shortHeadline': 'Travel',
                'longHeadline': 'Travel the World',
                'description': 'Take to the air!',
                'businessName': 'Interplanetary Cruises',
                'finalUrls': ['http://www.example.com']
            },
            # Optional fields.
            'status': 'PAUSED'
        }
    }]

    # Make the mutate request.
    ads = ad_group_ad_service.mutate(operations)

    # Display results.
    for ad in ads['value']:
      print ('ResponsiveDisplayAd with id "%d" and short headline "%s" was '
             'added.' % (ad['ad']['id'], ad['ad']['shortHeadline']))

  except:
    raise Exception('Failed to create responsive display ad.')

PHP

function AddResponsiveDisplayAd(AdWordsUser $user, $adGroupId) {
  // Get the service, which loads the required classes.
  $mediaService = $user->GetService('MediaService', ADWORDS_VERSION);

  // Creates image.
  $image = new Image();
  $image->data = MediaUtils::GetBase64Data('https://goo.gl/3b9Wfh');
  $image->type = 'IMAGE';

  // Make the upload request.
  $result = $mediaService->upload(array($image));
  $image = $result[0];

  // Get the service, which loads the required classes.
  $adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_VERSION);

  // Create a responsive display ad.
  $responsiveDisplayAd = new ResponsiveDisplayAd();

  // This ad format does not allow the creation of an image using the
  // Image.data field. An image must first be created using the MediaService,
  // and Image.mediaId must be populated when creating the ad.
  $marketingImage = new Image();
  $marketingImage->mediaId = $image->mediaId;

  $responsiveDisplayAd->marketingImage = $marketingImage;
  $responsiveDisplayAd->shortHeadline = 'Travel';
  $responsiveDisplayAd->longHeadline = 'Travel the World';
  $responsiveDisplayAd->description = 'Take to the air!';
  $responsiveDisplayAd->businessName = 'Google';
  $responsiveDisplayAd->finalUrls = array('http://www.example.com');

  // Create ad group ad.
  $adGroupAd = new AdGroupAd();
  $adGroupAd->adGroupId = $adGroupId;
  $adGroupAd->ad = $responsiveDisplayAd;

  // Set additional settings (optional).
  $adGroupAd->status = 'PAUSED';

  // Create operation.
  $operation = new AdGroupAdOperation();
  $operation->operand = $adGroupAd;
  $operation->operator = 'ADD';
  $operations[] = $operation;

  // Make the mutate request.
  $result = $adGroupAdService->mutate($operations);

  // Display results.
  foreach ($result->value as $adGroupAd) {
    printf("Responsive display ad with ID '%d' and short headline '%s'"
        . " was added.\n", $adGroupAd->ad->id, $adGroupAd->ad->shortHeadline);
  }
}

Perl

sub add_responsive_display_ad {
  my $client      = shift;
  my $ad_group_id = shift;

  # Create image.
  my $image_data = Google::Ads::Common::MediaUtils::get_base64_data_from_url(
    "https://goo.gl/3b9Wfh");
  my $image = Google::Ads::AdWords::v201609::Image->new({
      data => $image_data,
      type => "IMAGE"
  });

  # Upload image.
  $image = $client->MediaService()->upload({media => [$image]});

  # This ad format does not allow the creation of an image using the
  # Image.data field. An image must first be created using the MediaService,
  # and Image.mediaId must be populated when creating the ad.
  my $marketing_image = Google::Ads::AdWords::v201609::Image->new(
    {mediaId => $image->get_mediaId()});

  # Create the responsive display ad.
  my $responsive_display_ad =
    Google::Ads::AdWords::v201609::ResponsiveDisplayAd->new({
      marketingImage => $marketing_image,
      shortHeadline  => "Travel",
      longHeadline   => "Travel the World",
      description    => "Take to the air!",
      businessName   => "Interplanetary Cruises",
      finalUrls      => ["http://www.example.com/"],
    });

  # Create ad group ad for the responsive display ad.
  my $responsive_display_ad_group_ad =
    Google::Ads::AdWords::v201609::AdGroupAd->new({
      adGroupId => $ad_group_id,
      ad        => $responsive_display_ad,
      # Additional properties (non-required).
      status => "PAUSED"
    });

  # Create operation.
  my $responsive_display_ad_group_ad_operation =
    Google::Ads::AdWords::v201609::AdGroupAdOperation->new({
      operator => "ADD",
      operand  => $responsive_display_ad_group_ad
    });

  # Add responsive display ad.
  my $result =
    $client->AdGroupAdService()
    ->mutate({operations => [$responsive_display_ad_group_ad_operation]});

  # Display results.
  if ($result->get_value()) {
    foreach my $ad_group_ad (@{$result->get_value()}) {
      printf "New responsive display ad with id \"%d\" and " .
        "short headline \"%s\" was added.\n",
        $ad_group_ad->get_ad()->get_id(),
        $ad_group_ad->get_ad()->get_shortHeadline();
    }
  } else {
    print "No responsive display ads were added.\n";
  }

  return 1;
}

Ruby

ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
media_srv = adwords.service(:MediaService, API_VERSION)

# Create an image.
image_url = 'https://goo.gl/3b9Wfh'
raw_image_data = AdsCommon::Http.get(image_url, adwords.config)
image = {
  :xsi_type => 'Image',
  :data => Base64.encode64(raw_image_data),
  :type => 'IMAGE'
}

# Upload the image.
response = media_srv.upload([image])
if response and !response.empty?
  image = response.first
else
  raise StandardError, "Could not uplooad image. Aborting before creating ad."
end

# Create the responsive display ad.
responsive_display_ad = {
  :xsi_type => 'ResponsiveDisplayAd',
  # This ad format does not allow the creation of an image using the
  # Image.data field. An image must first be created using the MediaService,
  # and Image.mediaId must be populated when creating the ad.
  :marketing_image => {
    :media_id => image[:media_id]
  },
  :short_headline => 'Travel',
  :long_headline => 'Traver the World',
  :description => 'Take to the air!',
  :business_name => 'Interplanetary Cruises',
  :final_urls => ['http://www.example.com/']
}

# Create an ad group ad for the responsive display ad.
responsive_display_ad_group_ad = {
  :ad_group_id => ad_group_id,
  :ad => responsive_display_ad,
  # Additional propertires (non-required).
  :status => 'PAUSED'
}

# Create operation.
responsive_display_ad_group_ad_operations = {
  :operator => 'ADD',
  :operand => responsive_display_ad_group_ad
}

# Add the responsive display ad.
result = ad_group_ad_srv.mutate([responsive_display_ad_group_ad_operations])

# Display results.
if result && result[:value]
  result[:value].each do |ad_group_ad|
    puts ('New responsive display ad with id %d and short headline %s was ' +
        'added.') % [ad_group_ad[:ad][:id], ad_group_ad[:ad][:short_headline]]
  end
else
  puts "No responsive display ads were added."
end

レスポンシブ広告は、Google ディスプレイ ネットワークを対象とするキャンペーンでのみ掲載されます。キャンペーンの advertisingChannelTypeDISPLAY が設定されていることを確認してください。AdWords 管理画面では、このキャンペーンは「ディスプレイ ネットワークのみ - すべての機能」として表示されます。

仕様

マーケティング画像とロゴ画像は、次のサイズ仕様を満たしている必要があります。

  • マーケティング画像

    • 最小サイズ: 600×314 ピクセル

    • 最小サイズ以上にする場合: 1.91:1 の比率の誤差 1% 以内

    • 推奨サイズ: 1,200×628 ピクセル

    • 最大ファイルサイズ: 1 MB(1,048,576 バイト)

  • ロゴ画像(省略可)

    • 最小サイズ: 128×128 ピクセル

    • 最小サイズ以上にする場合: 1:1 の比率の誤差 1% 以内

    • 推奨サイズ: 1,200×1,200 ピクセル

    • 最大ファイルサイズ: 1 MB(1,048,576 バイト)

レポート

レスポンシブ広告のレポートでは AdTypeRESPONSIVE_DISPLAY_AD となります。

AD_PERFORMANCE_REPORT には、次のようなレスポンシブ広告に固有のフィールドがあります。

アップグレードのヒント

この新しい広告フォーマットはテスト アカウントですぐにでもお試しいただけます。標準のテキスト広告からディスプレイ ネットワーク向けのレスポンシブ広告にアップグレードする場合は、次の手順を行ってください。

  1. PAUSED 状態の新しいレスポンシブ広告を作成します。

  2. 新しいレスポンシブ広告の approvalStatusAPPROVED になるのを待ちます。

  3. 次の 2 つのオペレーションを含む AdGroupAdService.mutate() リクエストを送信します。

    • 新しいレスポンシブ広告の statusENABLED に設定する。
    • 以前の標準テキスト広告の statusDISABLED に設定する。

その他の一般的なヒントについては、効果的なディスプレイ広告を作成するためのヒントテキスト広告に基づいて独自のディスプレイ広告を作成するをご覧ください。

コードサンプル

フィードバックを送信...

ご不明な点がありましたら、Google のサポートページをご覧ください。