In den Ausrichtungseinstellungen können Sie festlegen, dass die Anzeigen in Ihrer Anzeigengruppe nur für bestimmte Zielgruppensegmente oder bei ausgewählten Inhalten ausgeliefert werden.
Targeting-Einstellung einrichten
Sie können Details dazu festlegen, wie die verschiedenen Kriterientypen für das Targeting verwendet werden. Dazu füllen Sie das Feld TargetingSetting mit einem Array von target_restrictions oder wenden inkrementelle Aktualisierungen mit target_restriction_operations an. Mit jedem TargetRestriction können Sie steuern, ob ein TargetingDimension (AUDIENCE, TOPIC, GENDER, AGE_RANGE, PLACEMENT, PARENTAL_STATUS oder INCOME_RANGE) die Option bid_only verwendet oder nicht.
Wenn Sie bid_only auf true festlegen, wird die Ausrichtungseinstellung auf „Beobachtung“ gesetzt. Die Kriterien werden dann nicht verwendet, um den Traffic einzuschränken, sondern ermöglichen es Ihnen, für verschiedene Nutzer in Ihren Listen unterschiedliche Gebote abzugeben. Wenn Sie bid_only auf false festlegen, wird die Ausrichtungseinstellung auf „Ausrichtung“ gesetzt. Dadurch werden die Kriterien aktiviert, um den Traffic der Anzeigengruppe nur auf Nutzer in der Liste zu beschränken, auf die die Ausrichtung erfolgt.
Die wichtigsten Unterschiede sind in der folgenden Tabelle zusammengefasst:
| Einstellung | bid_only |
Auswirkungen auf die Reichweite | Auswirkungen auf Gebote |
|---|---|---|---|
| Targeting | false |
Die Reichweite wird nur auf die ausgewählten Kriterien beschränkt. | Kann bestimmte Gebote für Kriterien festlegen |
| Beobachtung | true |
Die Reichweite wird nicht eingeschränkt. Anzeigen werden wie gewohnt ausgeliefert. | Ermöglicht Gebotsanpassungen für Kriterien |
Praktische Szenarien
Hier sind kurze Beispiele dafür, wann Sie den Beobachtungsmodus im Vergleich zum Ausrichtungsmodus verwenden sollten:
- Beobachtung
- Verwenden Sie den Beobachtungsmodus, wenn Sie eine Suchkampagne ausführen und wissen möchten, wie gut eine bestimmte Zielgruppe (z. B. „Sportfans“) im Vergleich zur Allgemeinheit konvertiert, ohne Ihre Anzeigen nur auf diese Zielgruppe zu beschränken. Sie können „Sportfans“ als Zielgruppenkriterium mit
bid_only = true(Beobachtung) hinzufügen und eine Gebotsanpassung von +10 % anwenden. So können Sie Leistungsdaten für diese Zielgruppe erfassen und wettbewerbsfähigere Gebote für sie abgeben, wenn sie eine gute Leistung erzielt, ohne dass Sie Traffic von Nutzern außerhalb dieser Zielgruppe verlieren. - Targeting
- Verwenden Sie den Targeting-Modus, wenn Sie eine Displaykampagne für das Remarketing auf Nutzer ausrichten, die Ihre Website zuvor besucht, aber keine Conversion ausgeführt haben, und Sie möchten, dass nur Nutzer in Ihrer Nutzerliste „Warenkorb abgebrochen“ diese speziellen Anzeigen sehen. In diesem Fall fügen Sie die Liste „Einkaufswagen ohne Kauf verlassen“ als
UserList-Kriterium mitbid_only = false(Ausrichtung) hinzu. So wird das Budget Ihrer Anzeigengruppe nur für dieses Zielgruppensegment mit hoher Kaufabsicht verwendet.
Best Practices
Bei nicht demografischen Targeting-Dimensionen (z. B. AUDIENCE) wird bid_only standardmäßig auf false festgelegt. Das bedeutet, dass die Targeting-Einstellung auf „Targeting“ festgelegt ist.
Wenn eine Zielbeschränkung für eine dieser Dimensionen im target_restrictions-Array eines TargetingSetting weggelassen wird oder nicht vorhanden ist, übernimmt das System das Standardverhalten „Targeting“ (bid_only ist implizit false) für diese Dimension.
Dieses Low-Level-API-Verhalten kann sich von der Google Ads-Benutzeroberfläche unterscheiden, auf der beim Erstellen von Kampagnen oder Anzeigengruppen für einige Targeting-Dimensionen (z. B. AUDIENCE für Suchkampagnen) standardmäßig automatisch „Beobachtung“ (bid_only ist true) angewendet wird. Bei Shopping-Kampagnen, die über die Benutzeroberfläche erstellt werden, werden beispielsweise die Dimensionseinstellungen für AUDIENCE standardmäßig aus Sicht der API weggelassen. Das bedeutet, dass sie implizit das Standard-API-Verhalten „Ausrichtung“ übernehmen (bid_only ist false).
Wenn Sie einer Such- oder Shopping-Kampagne Zielgruppensegmente hinzufügen, sollten Sie die Targeting-Einstellung von bid_only explizit auf true festlegen, um sie auf „Beobachtung“ zu setzen.
Wenn Sie eine duplizierte Kampagne für Zielgruppensegmente für Suchanzeigen einrichten, behalten Sie die Ausrichtung von bid_only auf false bei.
Einschränkungen
Sie können targeting_setting nicht in einer AdGroup hinzufügen oder aktualisieren, wenn targeting_setting in der übergeordneten Kampagne festgelegt ist. Wenn targeting_setting für das übergeordnete Campaign festgelegt ist, müssen Sie zuerst targeting_setting für das übergeordnete Campaign entfernen. Ebenso müssen Sie zuerst die targeting_setting für die AdGroup entfernen, um sie für die Campaign festzulegen.
Wenn Sie einen targeting_setting aus einem Campaign oder AdGroup entfernen möchten, senden Sie einen update-Vorgang, bei dem targeting_setting.target_restrictions gelöscht (auf eine leere Liste gesetzt) ist, und fügen Sie targeting_setting.target_restrictions in die update_mask ein.
Targeting-Einstellung abrufen
Wenn Sie prüfen möchten, ob die Ausrichtung wie gewünscht eingerichtet ist, rufen Sie in einer Suchanfrage das Feld ad_group.targeting_setting.target_restrictions aus der Ressource ad_group oder das Feld campaign.targeting_setting.target_restrictions aus der Ressource campaign auf, um die targeting_setting für Anzeigengruppen oder Kampagnen zu prüfen.
Beispiel
In diesem Beispiel wird die targeting_setting für eine Anzeigengruppe aktualisiert, sodass bid_only für TargetRestriction-Instanzen mit einem targeting_dimension von AUDIENCE auf true gesetzt wird. So können Sie die Leistung beobachten und Gebotsanpassungen für Nutzer im Zielgruppensegment festlegen, ohne die Reichweite einzuschränken.
Rufen Sie zuerst alle ad_group.targeting_setting.target_restrictions aus der Anzeigengruppe mit der angegebenen ID ab.
Java
String searchQuery = "SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions " + "FROM ad_group " + "WHERE ad_group.id = " + adGroupId;
C#
string query = $@" SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions FROM ad_group WHERE ad_group.id = {adGroupId}";
PHP
$query = "SELECT ad_group.id, ad_group.name, " . "ad_group.targeting_setting.target_restrictions " . "FROM ad_group " . "WHERE ad_group.id = $adGroupId";
Python
query: str = f""" SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions FROM ad_group WHERE ad_group.id = {ad_group_id}"""
Ruby
query = <<~QUERY SELECT ad_group.id, ad_group.name, ad_group.targeting_setting.target_restrictions FROM ad_group WHERE ad_group.id = #{ad_group_id} QUERY
Perl
my $query = "SELECT ad_group.id, ad_group.name, " . "ad_group.targeting_setting.target_restrictions FROM ad_group " . "WHERE ad_group.id = $ad_group_id";
curl
Gehen Sie als Nächstes die Zielbeschränkungen durch und rekonstruieren Sie die TargetingSetting-Objekte. Wenn der Code auf ein TargetRestriction-Objekt mit einem targeting_dimension-Wert von AUDIENCE und einem bid_only-Wert von false stößt, wird das Feld bid_only des TargetRestriction-Objekts auf true (oder „Observation“) aktualisiert und dem TargetingSetting-Objekt hinzugefügt. Andernfalls fügen Sie das vom Server zurückgegebene TargetRestriction-Objekt dem TargetingSetting hinzu.
Java
for (TargetRestriction targetRestriction : targetRestrictions) { TargetingDimension targetingDimension = targetRestriction.getTargetingDimension(); boolean bidOnly = targetRestriction.getBidOnly(); System.out.printf( "- Targeting restriction with targeting dimension '%s' and bid only set to '%b'.%n", targetingDimension, bidOnly); // Adds the target restriction to the TargetingSetting object as is if the targeting // dimension has a value other than AUDIENCE because those should not change. if (!targetingDimension.equals(TargetingDimension.AUDIENCE)) { targetingSettingBuilder.addTargetRestrictions(targetRestriction); } else if (!bidOnly) { shouldUpdateTargetingSetting = true; // Adds an AUDIENCE target restriction with bid_only set to true to the targeting // setting object. This has the effect of setting the AUDIENCE target restriction to // "Observation". For more details about the targeting setting, visit // https://support.google.com/google-ads/answer/7365594. targetingSettingBuilder.addTargetRestrictions( TargetRestriction.newBuilder() .setTargetingDimensionValue(TargetingDimension.AUDIENCE_VALUE) .setBidOnly(true)); } }
C#
foreach (TargetRestriction targetRestriction in targetRestrictions) { TargetingDimension targetingDimension = targetRestriction.TargetingDimension; bool bidOnly = targetRestriction.BidOnly; Console.WriteLine("\tTargeting restriction with targeting dimension " + $"'{targetingDimension}' and bid only set to '{bidOnly}'."); // Add the target restriction to the TargetingSetting object as is if the // targeting dimension has a value other than AUDIENCE because those should // not change. if (targetingDimension != TargetingDimension.Audience) { targetingSetting.TargetRestrictions.Add(targetRestriction); } else if (!bidOnly) { shouldUpdateTargetingSetting = true; // Add an AUDIENCE target restriction with bid_only set to true to the // targeting setting object. This has the effect of setting the AUDIENCE // target restriction to "Observation". For more details about the // targeting setting, visit // https://support.google.com/google-ads/answer/7365594. targetingSetting.TargetRestrictions.Add(new TargetRestriction { TargetingDimension = TargetingDimension.Audience, BidOnly = true }); } }
PHP
foreach ( $adGroup->getTargetingSetting()->getTargetRestrictions() as $targetRestriction ) { // Prints the results. $targetingDimension = $targetRestriction->getTargetingDimension(); $bidOnly = $targetRestriction->getBidOnly(); printf( "- Targeting restriction with targeting dimension '%s' and bid only set to " . "'%s'.%s", TargetingDimension::name($targetingDimension), $bidOnly ? 'true' : 'false', PHP_EOL ); // Adds the target restriction to the TargetingSetting object as is if the targeting // dimension has a value other than AUDIENCE because those should not change. if ($targetingDimension !== TargetingDimension::AUDIENCE) { $targetRestrictions[] = $targetRestriction; } elseif (!$bidOnly) { $shouldUpdateTargetingSetting = true; // Adds an AUDIENCE target restriction with bid_only set to true to the // targeting setting object. This has the effect of setting the AUDIENCE // target restriction to "Observation". // For more details about the targeting setting, visit // https://support.google.com/google-ads/answer/7365594. $targetRestrictions[] = new TargetRestriction( [ 'targeting_dimension' => TargetingDimension::AUDIENCE, 'bid_only' => true ] ); } }
Python
target_restriction: TargetRestriction for target_restriction in target_restrictions: targeting_dimension: TargetingDimensionEnum.TargetingDimension = ( target_restriction.targeting_dimension ) bid_only: bool = target_restriction.bid_only print( "\tTargeting restriction with targeting dimension " f"'{targeting_dimension.name}' " f"and bid only set to '{bid_only}'." ) # Add the target restriction to the TargetingSetting object as # is if the targeting dimension has a value other than audience # because those should not change. if targeting_dimension != targeting_dimension_enum.AUDIENCE: targeting_setting.target_restrictions.append(target_restriction) elif not bid_only: should_update_targeting_setting: bool = True # Add an audience target restriction with bid_only set to # true to the targeting setting object. This has the effect # of setting the audience target restriction to # "Observation". For more details about the targeting # setting, visit # https://support.google.com/google-ads/answer/7365594. new_target_restriction: TargetRestriction = ( targeting_setting.target_restrictions.add() ) new_target_restriction.targeting_dimension = ( targeting_dimension_enum.AUDIENCE ) new_target_restriction.bid_only = True
Ruby
ad_group.targeting_setting.target_restrictions.each do |r| # Prints the results. targeting_dimension = r.targeting_dimension bid_only = r.bid_only puts "- Targeting restriction with targeting dimension " \ "#{targeting_dimension} and bid only set to #{bid_only}." # Adds the target restriction to the TargetingSetting object as is if the # targeting dimension has a value other than AUDIENCE because those should # not change. if targeting_dimension != :AUDIENCE target_restrictions << r elsif !bid_only should_update_targeting_setting = true # Adds an AUDIENCE target restriction with bid_only set to true to the # targeting setting object. This has the effect of setting the AUDIENCE # target restriction to "Observation". # For more details about the targeting setting, visit # https://support.google.com/google-ads/answer/7365594. target_restrictions << client.resource.target_restriction do |tr| tr.targeting_dimension = :AUDIENCE tr.bid_only = true end end end
Perl
foreach my $target_restriction (@target_restrictions) { my $targeting_dimension = $target_restriction->{targetingDimension}; printf "\tTargeting restriction with targeting dimension '%s' and bid " . "only set to '%s'.\n", $targeting_dimension, $target_restriction->{bidOnly} ? "TRUE" : "FALSE"; # Add the target restriction to the TargetingSetting object as is if the # targeting dimension has a value other than AUDIENCE because those # should not change. if ($targeting_dimension ne AUDIENCE) { $target_restriction->{bidOnly} = $target_restriction->{bidOnly} ? "true" : "false"; push @{$targeting_setting->{targetRestrictions}}, $target_restriction; } elsif (!$target_restriction->{bidOnly}) { $should_update_target_setting = 1; # Add an AUDIENCE target restriction with bid_only set to true to the # targeting setting object. This has the effect of setting the # AUDIENCE target restriction to "Observation". For more details about # the targeting setting, visit # https://support.google.com/google-ads/answer/7365594. my $new_restriction = Google::Ads::GoogleAds::V26::Common::TargetRestriction->new({ targetingDimension => AUDIENCE, bidOnly => "true" }); push @{$targeting_setting->{targetRestrictions}}, $new_restriction; } }
curl
Wenn der Code schließlich auf eine Zielgruppeneinschränkung stößt, die aktualisiert werden muss, wird die Anzeigengruppe mit den neuen Targeting-Einstellungen aktualisiert.
Java
private void updateTargetingSetting( GoogleAdsClient googleAdsClient, long customerId, long adGroupId, TargetingSetting targetingSetting) { // Creates the ad group service client. try (AdGroupServiceClient adGroupServiceClient = googleAdsClient.getLatestVersion().createAdGroupServiceClient()) { // Creates an ad group object with the proper resource name and updated targeting setting. AdGroup adGroup = AdGroup.newBuilder() .setResourceName(ResourceNames.adGroup(customerId, adGroupId)) .setTargetingSetting(targetingSetting) .build(); // Constructs an operation that will update the ad group, using the FieldMasks utility to // derive the update mask. This mask tells the Google Ads API which attributes of the // ad group you want to change. AdGroupOperation operation = AdGroupOperation.newBuilder() .setUpdate(adGroup) .setUpdateMask(FieldMasks.allSetFieldsOf(adGroup)) .build(); // Sends the operation in a mutate request. MutateAdGroupsResponse response = adGroupServiceClient.mutateAdGroups( Long.toString(customerId), ImmutableList.of(operation)); // Prints the resource name of the updated object. System.out.printf( "Updated targeting setting of ad group with resource name '%s'; set the AUDIENCE " + "target restriction to 'Observation'.%n", response.getResults(0).getResourceName()); } }
C#
private void UpdateTargetingSetting(GoogleAdsClient client, long customerId, long adGroupId, TargetingSetting targetingSetting) { // Get the AdGroupService client. AdGroupServiceClient adGroupServiceClient = client.GetService(Services.V26.AdGroupService); // Create an ad group object with the updated targeting setting. AdGroup adGroup = new AdGroup { ResourceName = ResourceNames.AdGroup(customerId, adGroupId), TargetingSetting = targetingSetting }; // Construct an operation that will update the ad group, using the FieldMasks utility // to derive the update mask. This mask tells the Google Ads API which attributes of the // ad group you want to change. AdGroupOperation operation = new AdGroupOperation { Update = adGroup, UpdateMask = FieldMasks.AllSetFieldsOf(adGroup) }; // Send the operation in a mutate request. MutateAdGroupsResponse response = adGroupServiceClient.MutateAdGroups(customerId.ToString(), new[] { operation }); // Print the resource name of the updated object. Console.WriteLine("Updated targeting setting of ad group with resource name " + $"'{response.Results.First().ResourceName}'; set the AUDIENCE target restriction " + "to 'Observation'."); }
PHP
private static function updateTargetingSetting( GoogleAdsClient $googleAdsClient, int $customerId, int $adGroupId, TargetingSetting $targetingSetting ) { // Creates an ad group object with the proper resource name and updated targeting setting. $adGroup = new AdGroup( [ 'resource_name' => ResourceNames::forAdGroup($customerId, $adGroupId), 'targeting_setting' => $targetingSetting ] ); // Constructs an operation that will update the ad group with the specified resource name, // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads // API which attributes of the ad group you want to change. $adGroupOperation = new AdGroupOperation(); $adGroupOperation->setUpdate($adGroup); $adGroupOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroup)); // Issues a mutate request to update the ad group. $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient(); $response = $adGroupServiceClient->mutateAdGroups( MutateAdGroupsRequest::build($customerId, [$adGroupOperation]) ); // Prints the resource name of the updated ad group. printf( "Updated targeting setting of ad group with resource name '%s'; set the AUDIENCE " . "target restriction to 'Observation'.%s", $response->getResults()[0]->getResourceName(), PHP_EOL ); }
Python
def update_targeting_setting( client: GoogleAdsClient, customer_id: str, ad_group_id: str, targeting_setting: TargetingSetting, ) -> None: """Updates the given TargetingSetting of an ad group. Args: client: The Google Ads client. customer_id: The Google Ads customer ID. ad_group_id: The ad group ID for which to update the audience targeting restriction. targeting_setting: The updated targeting setting. """ # Get the AdGroupService client. ad_group_service: AdGroupServiceClient = client.get_service( "AdGroupService" ) # Construct an operation that will update the ad group. ad_group_operation: AdGroupOperation = client.get_type("AdGroupOperation") # Populate the ad group object with the updated targeting setting. ad_group: AdGroup = ad_group_operation.update ad_group.resource_name = ad_group_service.ad_group_path( customer_id, ad_group_id ) ad_group.targeting_setting.target_restrictions.extend( targeting_setting.target_restrictions ) # Use the field_mask utility to derive the update mask. This mask tells the # Google Ads API which attributes of the ad group you want to change. client.copy_from( ad_group_operation.update_mask, protobuf_helpers.field_mask(None, ad_group._pb), ) # Send the operation in a mutate request and print the resource name of the # updated object. mutate_ad_groups_response: MutateAdGroupsResponse = ( ad_group_service.mutate_ad_groups( customer_id=customer_id, operations=[ad_group_operation] ) ) print( "Updated targeting setting of ad group with resource name " f"'{mutate_ad_groups_response.results[0].resource_name}'; set the " "audience target restriction to 'Observation'." )
Ruby
def update_targeting_setting( client, customer_id, ad_group_id, targeting_setting) # Constructs an operation that will update the ad group with the specified # resource name. ad_group_resource_name = client.path.ad_group(customer_id, ad_group_id) operation = client.operation.update_resource.ad_group(ad_group_resource_name) do |ag| ag.targeting_setting = targeting_setting end # Issues a mutate request to update the ad group. response = client.service.ad_group.mutate_ad_groups( customer_id: customer_id, operations: [operation], ) # Prints the resource name of the updated ad group. puts "Updated targeting setting of ad group with resource name " \ "#{response.results.first.resource_name}; set the AUDIENCE target " \ "restriction to 'Observation'." end
Perl
sub update_targeting_setting { my ($api_client, $customer_id, $ad_group_id, $targeting_setting) = @_; # Construct an ad group object with the updated targeting setting. my $ad_group = Google::Ads::GoogleAds::V26::Resources::AdGroup->new({ resourceName => Google::Ads::GoogleAds::V26::Utils::ResourceNames::ad_group( $customer_id, $ad_group_id ), targetingSetting => $targeting_setting }); # Create an operation that will update the ad group, using the FieldMasks # utility to derive the update mask. This mask tells the Google Ads API which # attributes of the ad group you want to change. my $ad_group_operation = Google::Ads::GoogleAds::V26::Services::AdGroupService::AdGroupOperation-> new({ update => $ad_group, updateMask => all_set_fields_of($ad_group)}); # Send the operation in a mutate request and print the resource name of the # updated resource. my $ad_groups_response = $api_client->AdGroupService()->mutate({ customerId => $customer_id, operations => [$ad_group_operation]}); printf "Updated targeting setting of ad group with resourceName " . "'%s'; set the AUDIENCE target restriction to 'Observation'.\n", $ad_groups_response->{results}[0]{resourceName}; }
curl
Das Festlegen des Felds bid_only für Kampagnen funktioniert fast genauso.
Nächste Schritte
- Informationen zu unterstützten Kriteriumstypen finden Sie im Leitfaden zu Kriterien.