本指南列出了可使用 Google Ads API 建立的各種轉換動作類型、對應項目如何對應到 Google Ads 網頁介面,以及詳細程式碼範例 (說明如何建立新轉換動作)。
如要評估轉換,請為要追蹤的轉換動作 type
設定 ConversionAction
。舉例來說,線上購物和來電需要不同的轉換動作。
在 API 中設定新轉換動作的最佳做法,就是使用下方的「新增轉換動作程式碼範例」。這個範例會為您處理所有背景驗證工作,並逐步引導您建立 ConversionAction
。
大多數轉換動作也需要您採取額外步驟來追蹤這些動作。舉例來說,如要追蹤網站上的轉換,您必須在網站的轉換頁中加入名為「代碼」的程式碼片段。如要瞭解其他轉換動作規定,請參閱說明中心文章。
網站轉換
網站轉換可讓您追蹤線上銷售、連結點擊、網頁瀏覽和註冊等網站動作。
如要追蹤網站上的轉換,您必須建立 ConversionAction
,並將 ConversionActionType
設為 WEBPAGE
,然後將稱為代碼的程式碼片段加入網站的轉換頁。
ConversionAction
包含多種網站轉換,在 API 中會根據 ConversionAction
的 tag_snippets 欄位中列出的 TagSnippet
中的 type
欄位進行區別。
TagSnippet
會提供追蹤程式碼,您必須在網站中加入該程式碼,以便追蹤轉換動作。網站和電話號碼點擊轉換需要 event_snippet
(應放在用於指定轉換動作的網頁,例如結帳確認或待開發客戶表單提交頁面) 以及 global_site_tag
(必須在網站的每個網頁上安裝)。您可以使用 ConversionActionService
擷取這兩個屬性。請造訪說明中心,進一步瞭解如何標記網頁。
下表列出 Google Ads 網頁介面上各個來源適用的相同 API 參數:
追蹤程式碼類型 | Google Ads 來源 |
---|---|
WEBPAGE |
網站、網站 (Google Analytics (分析) (GA4)) |
WEBPAGE_ONCLICK |
網站、網站 (Google Analytics (分析) (GA4)) |
CLICK_TO_CALL |
電話號碼點擊 |
--- |
網站 (Google Analytics (分析)) |
應用程式轉換
應用程式轉換可讓您追蹤來自 Google Play 商店的行動應用程式安裝或應用程式內購。
下表列出 Google Ads 網頁介面上每個「來源」使用的對等 ConversionActionType
API 參數:
轉換動作類型 | Google Ads 來源 |
---|---|
GOOGLE_PLAY_DOWNLOAD |
Google Play > 安裝 |
GOOGLE_PLAY_IN_APP_PURCHASE |
Google Play > 應用程式內購 |
如果您想要使用 Google Analytics (分析) 4 資源或第三方應用程式數據分析追蹤其他行動應用程式動作。請參閱「其他轉換動作類型」一文。
來電轉換
來電轉換追蹤能讓您追蹤廣告轉接來電、網站上電話號碼的來電,以及行動版網站上的電話號碼點擊。
下表列出 Google Ads 網頁介面上每個「來源」使用的對等 ConversionActionType
API 參數:
轉換動作類型 | Google Ads 來源 |
---|---|
AD_CALL |
來電額外資訊或來電專用廣告所獲得的來電 |
WEBSITE_CALL |
您網站上的電話號碼所獲得的來電 |
CLICK_TO_CALL |
您行動網站上電話號碼獲得的點擊 |
CLICK_TO_CALL
類型與 AD_CALL
類型不同,其不會追蹤實際來電。而 CLICK_TO_CALL
只會追蹤行動裝置的電話號碼點擊。如果您無法使用 Google 轉接號碼追蹤來電,這個方法就很實用。
AD_CALL
在 Google Ads 網頁介面中,AD_CALL
轉換動作會顯示為「廣告轉接來電」轉換。建立 AD_CALL
轉換動作後,請在建立 CallAsset
時,在 call_conversion_action
欄位中指定資源名稱。電話素材資源可讓您直接在廣告中顯示電話號碼。
如果來電通話時間超過指定時間長度,就會計為一次轉換。 預設值為 60 秒。
WEBSITE_CALL
在 Google Ads 網頁介面中,WEBSITE_CALL
轉換動作會顯示為網站來電轉換。
與 AD_CALL
不同的是,您必須在網站中加入 event_snippet
和 global_site_tag
,才能擷取動態 Google 轉接號碼,以便追蹤網站上所列電話號碼的來電追蹤。此外,您還必須設定電話素材資源,並在客戶、廣告活動或廣告群組層級連結。
匯入離線轉換
下表顯示 Google Ads 網頁介面上各個「來源」所用的對等 ConversionActionType
API 參數,以及各種特定轉換動作類型的說明文件連結:
轉換動作類型 | Google Ads 來源 | API 設定指南 |
---|---|---|
UPLOAD_CLICKS |
追蹤點擊帶來的轉換和待開發客戶強化轉換 | 上傳點擊指南
待開發客戶強化轉換指南 |
UPLOAD_CALLS |
追蹤來電所帶來的轉換 | API 設定指南 |
STORE_SALES |
追蹤轉換商店銷售 | API 設定指南 |
網站強化轉換
使用網站強化轉換功能,即可在轉換事件發生後 24 小時內 (而非同時) 傳送 WEBPAGE
轉換動作的第一方轉換資料。這樣就能從各種來源 (例如客戶資料庫或客戶關係管理系統) 找到第一方資料。
其他轉換動作類型
Google Ads API 在報表中提供其他類型的轉換動作,但可能會限製或禁止建立或修改這些動作。
SKAdNetwork 轉換
如果您放送 iOS 應用程式廣告活動,並已導入 SKAdNetwork,可以使用下列資源存取 Customer
和 Campaign
層級提供給 Google 的 SKAdNetwork 資料:
報表欄位 | 說明 |
---|---|
metrics.sk_ad_network_installs |
Apple 回報的安裝次數。這項指標只能根據 segments.sk_ad_network_conversion_value 與日期相關區隔的任意組合來區隔。 |
metrics.sk_ad_network_total_conversions |
轉換總數,包括 Apple 所回報的安裝和其他類型的轉換。這項指標只能按照 SKAdNetwork 相關區隔和日期相關區隔來區隔。 |
segments.sk_ad_network_ad_event_type |
特定轉換發生的事件類型。 |
segments.sk_ad_network_attribution_credit |
特定轉換的歸因功勞。 |
segments.sk_ad_network_fine_conversion_value |
Apple 記錄的轉換價值。這個區隔無法套用至 如果 Apple 回報 |
segments.sk_ad_network_coarse_conversion_value |
個別轉換的粗略價值。 |
segments.sk_ad_network_postback_sequence_index |
特定轉換的回傳順序 (以順序排列)。 |
segments.sk_ad_network_source_app.sk_ad_network_source_app_id |
顯示帶來 iOS Store Kit Kit Network Network 安裝的廣告的應用程式 ID。 |
segments.sk_ad_network_source_domain |
顯示促成 iOS Store Kit Kit Network Network 安裝的廣告的網站。如果值為空值,表示這個區隔不適用 (例如非 iOS 廣告活動),或是不在 Apple 傳送的任何回傳中出現。 |
segments.sk_ad_network_source_type |
顯示帶來 iOS Store Kit Kit Network Network 安裝的廣告的來源類型。如果值為空值,表示這個區隔不適用 (例如非 iOS 廣告活動),或是在 Apple 傳送的回傳中沒有來源網域和來源應用程式。 |
segments.sk_ad_network_user_type |
產生特定轉換的使用者類型 |
segments.sk_ad_network_redistributed_fine_conversion_value |
這個區隔中的轉換價值包含重新分配到轉換價值的空值。這個區隔代表 Apple 觀察到的精確轉換價值和 Google 提供的模擬空值總和。 |
您也可以透過 CustomerSkAdNetworkConversionValueSchema
,儲存 iOS 應用程式特定已連結客戶的 SKAdNetwork 轉換價值對應。
Python 程式碼範例
#!/usr/bin/env python # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import argparse import sys from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException def main(client, customer_id): """Adds a keyword plan, campaign, ad group, etc. to the customer account. Also handles errors from the API and prints them. Args: client: An initialized instance of GoogleAdsClient customer_id: A str of the customer_id to use in requests. """ res = update_skan_cv_schema( client, customer_id, "my_app_id", "account_link_id" ) print(res) def update_skan_cv_schema(client, customer_id, app_id, account_link_id): skan_service = client.get_service( "CustomerSkAdNetworkConversionValueSchemaService" ) req = client.get_type( "MutateCustomerSkAdNetworkConversionValueSchemaRequest" ) operation = client.get_type( "CustomerSkAdNetworkConversionValueSchemaOperation" ) schema_instance = client.get_type( "CustomerSkAdNetworkConversionValueSchema" ) new_schema = operation.update new_schema.resource_name = ( skan_service.customer_sk_ad_network_conversion_value_schema_path( "customer_id", "account_link_id" ) ) new_schema.schema.app_id = app_id new_schema.schema.measurement_window_hours = 48 skan_cv_mapping = ( schema_instance.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings() ) skan_cv_mapping.fine_grained_conversion_value = 0 # 0 - 63 skan_cv_mapping.conversion_value_mapping.min_time_post_install_hours = 0 skan_cv_mapping.conversion_value_mapping.max_time_post_install_hours = 48 skan_cv_event = schema_instance.SkAdNetworkConversionValueSchema.Event() skan_cv_event.mapped_event_name = "TEST" skan_cv_event.event_revenue_value = 10 skan_cv_mapping.conversion_value_mapping.mapped_events.append(skan_cv_event) new_schema.schema.fine_grained_conversion_value_mappings.append( skan_cv_mapping ) req.operation = operation req.customer_id = customer_id res = skan_service.mutate_customer_sk_ad_network_conversion_value_schema( req ) return res if __name__ == "__main__": # GoogleAdsClient will read the google-ads.yaml configuration file in the # home directory if none is specified. googleads_client = GoogleAdsClient.load_from_storage( version="v17" ) parser = argparse.ArgumentParser( description="Creates a keyword plan for specified customer." ) # The following argument(s) should be provided to run the example. parser.add_argument( "-c", "--customer_id", type=str, required=True, help="The Google Ads customer ID.", ) args = parser.parse_args() try: main(googleads_client, args.customer_id) except GoogleAdsException as ex: print( f'Request with ID "{ex.request_id}" failed with status ' f'"{ex.error.code().name}" and includes the following errors:' ) for error in ex.failure.errors: print(f'\tError with message "{error.message}".') if error.location: for field_path_element in error.location.field_path_elements: print(f"\t\tOn field: {field_path_element.field_name}") sys.exit(1)
Google Analytics
已連結 Google Analytics (分析) 資源的轉換具有下列其中一個 type
值:
GA4 資源轉換:
GOOGLE_ANALYTICS_4_CUSTOM
GOOGLE_ANALYTICS_4_PURCHASE
您也可以透過
google_analytics_4_settings
欄位擷取 GA4 資源 ID、屬性名稱和事件名稱。通用 Analytics (分析) 資源轉換:
UNIVERSAL_ANALYTICS_GOAL
UNIVERSAL_ANALYTICS_TRANSACTION
您可以對 GA4 資源轉換進行以下變更:
- 將 GA4 資源的
status
欄位從HIDDEN
修改為ENABLED
,將轉換資料從 GA4 資源匯入 Google Ads 帳戶。 - 修改其
primary_for_goal
和category
欄位,指定其對 Google Ads 出價和報表的影響。 - 更新其
name
或value_settings
。 - 使用
remove
作業,將轉換從 Google Ads 帳戶中移除。
若嘗試修改已匯入 GA4 轉換的其他屬性,或是匯入的通用 Analytics (分析) 轉換的「任何」屬性,就會導致 MUTATE_NOT_ALLOWED
錯誤。只能透過 Google Ads 使用者介面進行變更。
Firebase 和第三方應用程式數據分析
如要匯入第三方應用程式數據分析或 Firebase 轉換,請使用 ConversionActionService
的 mutate
方法,將 ConversionAction
的 status
從 HIDDEN
變更為 ENABLED
。這些轉換動作不支援更新 app_id
。
FIREBASE_ANDROID_FIRST_OPEN
FIREBASE_ANDROID_IN_APP_PURCHASE
FIREBASE_ANDROID_CUSTOM
FIREBASE_IOS_FIRST_OPEN
FIREBASE_IOS_IN_APP_PURCHASE
FIREBASE_IOS_CUSTOM
THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN
THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE
THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM
THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN
THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE
THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM
商店銷售額
雖然您無法使用 Google Ads API 建立 STORE_SALES
或 STORE_SALES_DIRECT_UPLOAD
轉換動作,但此 API 支援上傳商店銷售交易。
STORE_SALES
STORE_SALES_DIRECT_UPLOAD
其他
下列轉換動作類型在 Google Ads API 中僅供讀取,以用於製作報表。
ANDROID_APP_PRE_REGISTRATION
ANDROID_INSTALLS_ALL_OTHER_APPS
FLOODLIGHT_ACTION
FLOODLIGHT_TRANSACTION
GOOGLE_HOSTED
LEAD_FORM_SUBMIT
SALESFORCE
SEARCH_ADS_360
SMART_CAMPAIGN_AD_CLICKS_TO_CALL
SMART_CAMPAIGN_MAP_CLICKS_TO_CALL
SMART_CAMPAIGN_MAP_DIRECTIONS
SMART_CAMPAIGN_TRACKED_CALLS
STORE_VISITS
WEBPAGE_CODELESS
不明
如果您的 Google Ads 帳戶包含其他類型的轉換動作,則當 ConversionAction.type
為 UNKNOWN
時,查詢和報表可能會傳回轉換動作。API 不支援管理這些轉換動作,但會在報表中傳回,以提供重要轉換指標 (例如 metrics.conversions
和 metrics.conversions_value
) 的完整結果。
程式碼範例
以下程式碼範例會逐步引導您建立新轉換動作。具體來說,它會在 type
設為 UPLOAD_CLICKS
的情況下建立轉換動作。Google Ads UI 流程與透過「Import > Manual import with API 或上傳」>「追蹤點擊帶來的轉換」建立新轉換動作一樣。它也會將 category
設為 DEFAULT
。
系統會套用下列預設設定:
Google Ads API 會自動設定
primary_for_goal
欄位,但您可以明確設定這個欄位,控制在搭配轉換目標時,轉換動作對帳戶報表和出價的影響。Google Ads API 會將
counting_type
自動設為MANY_PER_CLICK
。詳情請參閱「關於轉換計算選項」一文。Google Ads API 會將
attribution_model_settings
欄位的GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN
值設為AttributionModel
,將歸因模式設為「以數據為準」。
Java
private void runExample(GoogleAdsClient googleAdsClient, long customerId) { // Creates a ConversionAction. ConversionAction conversionAction = ConversionAction.newBuilder() // Note that conversion action names must be unique. If a conversion action already // exists with the specified conversion_action_name the create operation will fail with // a ConversionActionError.DUPLICATE_NAME error. .setName("Earth to Mars Cruises Conversion #" + getPrintableDateTime()) .setCategory(ConversionActionCategory.DEFAULT) .setType(ConversionActionType.WEBPAGE) .setStatus(ConversionActionStatus.ENABLED) .setViewThroughLookbackWindowDays(15L) .setValueSettings( ValueSettings.newBuilder() .setDefaultValue(23.41) .setAlwaysUseDefaultValue(true) .build()) .build(); // Creates the operation. ConversionActionOperation operation = ConversionActionOperation.newBuilder().setCreate(conversionAction).build(); try (ConversionActionServiceClient conversionActionServiceClient = googleAdsClient.getLatestVersion().createConversionActionServiceClient()) { MutateConversionActionsResponse response = conversionActionServiceClient.mutateConversionActions( Long.toString(customerId), Collections.singletonList(operation)); System.out.printf("Added %d conversion actions:%n", response.getResultsCount()); for (MutateConversionActionResult result : response.getResultsList()) { System.out.printf( "New conversion action added with resource name: '%s'%n", result.getResourceName()); } } }
C#
public void Run(GoogleAdsClient client, long customerId) { // Get the ConversionActionService. ConversionActionServiceClient conversionActionService = client.GetService(Services.V17.ConversionActionService); // Note that conversion action names must be unique. // If a conversion action already exists with the specified name the create operation // will fail with a ConversionAction.DUPLICATE_NAME error. string ConversionActionName = "Earth to Mars Cruises Conversion #" + ExampleUtilities.GetRandomString(); // Add a conversion action. ConversionAction conversionAction = new ConversionAction() { Name = ConversionActionName, Category = ConversionActionCategory.Default, Type = ConversionActionType.Webpage, Status = ConversionActionStatus.Enabled, ViewThroughLookbackWindowDays = 15, ValueSettings = new ConversionAction.Types.ValueSettings() { DefaultValue = 23.41, AlwaysUseDefaultValue = true } }; // Create the operation. ConversionActionOperation operation = new ConversionActionOperation() { Create = conversionAction }; try { // Create the conversion action. MutateConversionActionsResponse response = conversionActionService.MutateConversionActions(customerId.ToString(), new ConversionActionOperation[] { operation }); // Display the results. foreach (MutateConversionActionResult newConversionAction in response.Results) { Console.WriteLine($"New conversion action with resource name = " + $"'{newConversionAction.ResourceName}' was added."); } } catch (GoogleAdsException e) { Console.WriteLine("Failure:"); Console.WriteLine($"Message: {e.Message}"); Console.WriteLine($"Failure: {e.Failure}"); Console.WriteLine($"Request ID: {e.RequestId}"); throw; } }
PHP
public static function runExample(GoogleAdsClient $googleAdsClient, int $customerId) { // Creates a conversion action. $conversionAction = new ConversionAction([ // Note that conversion action names must be unique. // If a conversion action already exists with the specified conversion_action_name // the create operation will fail with a ConversionActionError.DUPLICATE_NAME error. 'name' => 'Earth to Mars Cruises Conversion #' . Helper::getPrintableDatetime(), 'category' => ConversionActionCategory::PBDEFAULT, 'type' => ConversionActionType::WEBPAGE, 'status' => ConversionActionStatus::ENABLED, 'view_through_lookback_window_days' => 15, 'value_settings' => new ValueSettings([ 'default_value' => 23.41, 'always_use_default_value' => true ]) ]); // Creates a conversion action operation. $conversionActionOperation = new ConversionActionOperation(); $conversionActionOperation->setCreate($conversionAction); // Issues a mutate request to add the conversion action. $conversionActionServiceClient = $googleAdsClient->getConversionActionServiceClient(); $response = $conversionActionServiceClient->mutateConversionActions( MutateConversionActionsRequest::build($customerId, [$conversionActionOperation]) ); printf("Added %d conversion actions:%s", $response->getResults()->count(), PHP_EOL); foreach ($response->getResults() as $addedConversionAction) { /** @var ConversionAction $addedConversionAction */ printf( "New conversion action added with resource name: '%s'%s", $addedConversionAction->getResourceName(), PHP_EOL ); } }
Python
def main(client, customer_id): conversion_action_service = client.get_service("ConversionActionService") # Create the operation. conversion_action_operation = client.get_type("ConversionActionOperation") # Create conversion action. conversion_action = conversion_action_operation.create # Note that conversion action names must be unique. If a conversion action # already exists with the specified conversion_action_name, the create # operation will fail with a ConversionActionError.DUPLICATE_NAME error. conversion_action.name = f"Earth to Mars Cruises Conversion {uuid.uuid4()}" conversion_action.type_ = ( client.enums.ConversionActionTypeEnum.UPLOAD_CLICKS ) conversion_action.category = ( client.enums.ConversionActionCategoryEnum.DEFAULT ) conversion_action.status = client.enums.ConversionActionStatusEnum.ENABLED conversion_action.view_through_lookback_window_days = 15 # Create a value settings object. value_settings = conversion_action.value_settings value_settings.default_value = 15.0 value_settings.always_use_default_value = True # Add the conversion action. conversion_action_response = ( conversion_action_service.mutate_conversion_actions( customer_id=customer_id, operations=[conversion_action_operation], ) ) print( "Created conversion action " f'"{conversion_action_response.results[0].resource_name}".' )
小茹
def add_conversion_action(customer_id) # GoogleAdsClient will read a config file from # ENV['HOME']/google_ads_config.rb when called without parameters client = Google::Ads::GoogleAds::GoogleAdsClient.new # Add a conversion action. conversion_action = client.resource.conversion_action do |ca| ca.name = "Earth to Mars Cruises Conversion #{(Time.new.to_f * 100).to_i}" ca.type = :UPLOAD_CLICKS ca.category = :DEFAULT ca.status = :ENABLED ca.view_through_lookback_window_days = 15 # Create a value settings object. ca.value_settings = client.resource.value_settings do |vs| vs.default_value = 15 vs.always_use_default_value = true end end # Create the operation. conversion_action_operation = client.operation.create_resource.conversion_action(conversion_action) # Add the ad group ad. response = client.service.conversion_action.mutate_conversion_actions( customer_id: customer_id, operations: [conversion_action_operation], ) puts "New conversion action with resource name = #{response.results.first.resource_name}." end
Perl
sub add_conversion_action { my ($api_client, $customer_id) = @_; # Note that conversion action names must be unique. # If a conversion action already exists with the specified conversion_action_name, # the create operation fails with error ConversionActionError.DUPLICATE_NAME. my $conversion_action_name = "Earth to Mars Cruises Conversion #" . uniqid(); # Create a conversion action. my $conversion_action = Google::Ads::GoogleAds::V17::Resources::ConversionAction->new({ name => $conversion_action_name, category => DEFAULT, type => WEBPAGE, status => ENABLED, viewThroughLookbackWindowDays => 15, valueSettings => Google::Ads::GoogleAds::V17::Resources::ValueSettings->new({ defaultValue => 23.41, alwaysUseDefaultValue => "true" })}); # Create a conversion action operation. my $conversion_action_operation = Google::Ads::GoogleAds::V17::Services::ConversionActionService::ConversionActionOperation ->new({create => $conversion_action}); # Add the conversion action. my $conversion_actions_response = $api_client->ConversionActionService()->mutate({ customerId => $customer_id, operations => [$conversion_action_operation]}); printf "New conversion action added with resource name: '%s'.\n", $conversion_actions_response->{results}[0]{resourceName}; return 1; }
您也可以在用戶端程式庫的「再行銷」資料夾和程式碼範例集合中找到這個範例:新增轉換動作程式碼範例。
驗證
Google Ads 和 Google Ads API 支援多種轉換動作,因此部分驗證規則會因動作的 type
而異。
目前在建立轉換動作時,最常見的錯誤是 DUPLICATE_NAME
。請務必為每個轉換動作使用專屬名稱。
以下提供一些設定 ConversionAction
欄位的訣竅:
- 所有列舉欄位
- 嘗試將任何列舉欄位設為
UNKNOWN
會導致RequestError.INVALID_ENUM_VALUE
錯誤。 app_id
app_id
屬性不可變動,且只能在建立新的應用程式轉換時設定。attribution_model_settings
- 將這個選項設為已淘汰的選項會導致
CANNOT_SET_RULE_BASED_ATTRIBUTION_MODELS
錯誤。Google Ads 僅支援GOOGLE_ADS_LAST_CLICK
和GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN
。 click_through_lookback_window_days
如果將這個屬性設為允許範圍以外的值,就會導致
RangeError.TOO_LOW
或RangeError.TOO_HIGH
錯誤。此屬性必須在
AD_CALL
或WEBSITE_CALL
轉換動作的[1,60]
範圍內。多數其他轉換動作的允許範圍為[1,30]
。include_in_conversions_metric
在
create
或update
中設定這個值會失敗,並顯示FieldError.IMMUTABLE_FIELD
錯誤。請改為按照轉換目標指南中的說明設定primary_for_goal
。phone_call_duration_seconds
如果嘗試為非來電的轉換動作設定此屬性,會導致
FieldError.VALUE_MUST_BE_UNSET
錯誤。type
type
屬性不可變動,且只能在建立新轉換時設定。更新
type
等於UNKNOWN
的轉換動作會導致MutateError.MUTATE_NOT_ALLOWED
錯誤。value_settings
WEBSITE_CALL
或AD_CALL
轉換動作的value_settings
必須將always_use_default_value
設為true
。建立或更新這個值時,指定false
的值會導致INVALID_VALUE
錯誤。view_through_lookback_window_days
如果將這個屬性設為允許範圍以外的值,就會導致
RangeError.TOO_LOW
或RangeError.TOO_HIGH
錯誤。多數轉換動作的允許範圍為[1,30]
。此屬性無法針對
AD_CALL
或WEBSITE_CALL
轉換動作設定。指定值會產生VALUE_MUST_BE_UNSET
錯誤。