地點素材資源
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
與其他素材資源不同,建立素材資源組合後,Google Ads API 會自動建立地點素材資源。首先,建立地點同步素材資源組合,並附加至客戶。接著,如要為廣告活動或廣告群組選取素材資源組合中的地點素材資源子集,請建立地點群組素材資源組合,並附加至廣告活動或廣告群組。
建立地點同步素材資源組合,並附加至顧客
- 建立地點同步素材資源組合。
- 使用
CustomerAssetSetService
將其附加至客戶。
建立地點同步素材資源組合
- 建立新的
AssetSet
。
- 將
type
設為 LOCATION_SYNC
。
- 將
location_set
設為新的 LocationSet
。
- 在新的「
LocationSet
」中,
- 根據用途設定
location_ownership_type
:
- 根據用途設定
source
oneof 欄位:
- 如要與 Google 商家檔案帳戶中的地點同步,請設定
business_profile_location_set
。
- 如要與指定連鎖店 ID 中的地點同步,請設定
chain_location_set
。
- 如要使用地點 ID 手動新增地點,請設定
maps_location_set
。
完成這些步驟後,Google Ads API 會產生地點資產,並將其新增至您建立的地點同步資產組合,與您使用 AssetSetAssetService
手動執行此操作時類似。除非要手動將這些素材資源加入靜態位置群組素材資源組合,否則不需要操作。
每個客戶只能有一個有效的地點同步素材資源組合 (status
of ENABLED
)。如要建立其他類型的地點同步素材資源組合,請先移除現有組合。
將地點同步資產組合附加至客戶
使用
CustomerAssetSetService.MutateCustomerAssetSets
將上一節中設定的地點同步素材資源組附加至顧客。
(選用) 建立營業地點群組素材資源組合,並附加至廣告活動或廣告群組
只有在需要選取部分地點素材資源時,才需要地區群組素材資源組合。這是因為廣告活動和廣告群組會沿用客戶層級的地點素材資源。
地區群組素材資源組合包含地點同步素材資源組合的部分地點素材資源。您可以運用 Google 商家檔案的部分功能 (例如依標籤篩選),或連鎖店 ID 和連鎖店地點,動態建立地區群組素材資源組合。或者,您也可以靜態建立地點群組素材資源組合。
- 建立營業地點群組素材資源集。地區群組素材資源組合可以是動態或靜態。
- 視需求而定,將素材資源組合附加至廣告活動或廣告群組。
- (選用) 將先前產生的素材資源新增至新建立的靜態位置群組素材資源組合。
您可以為特定顧客建立多個動態或靜態地點群組素材資源組合。
建立營業地點群組素材資源組合
建立新的 AssetSet
,並將 location_group_parent_asset_set_id
設為先前建立的地點同步素材資源組合 ID。
接著,請根據要建立動態或靜態地區群組素材資源組合,設定部分欄位。
動態素材資源組合
視您在LocationSet
中設定的欄位而定,請根據下列規則設定欄位:
如果您設定下列欄位 |
然後將 type 設為 |
並將這個欄位設為 asset_set_source oneof 欄位 |
business_profile_location_set |
BUSINESS_PROFILE_DYNAMIC_LOCATION_GROUP |
business_profile_location_group |
chain_location_set |
CHAIN_DYNAMIC_LOCATION_GROUP |
chain_location_group |
如果您在建立地點同步素材資源時設定 maps_location_set
,就無法建立動態地點群組素材資源組合。這是因為您是透過地點 ID 手動新增地點,且這類地點無法使用篩選功能。
靜態素材資源集
將 type
設為 STATIC_LOCATION_GROUP
。無論您在 LocationSet
中設定哪些欄位 (business_profile_location_set
、chain_location_set
或 maps_location_set
),都可以為任何類型的地點同步素材資源組合建立靜態地點群組素材資源組合。
如果是靜態地區群組素材資源組合,您需要手動將產生的地區額外資訊新增至地區群組素材資源組合。
將素材資源組合附加至廣告活動或廣告群組
使用
CampaignAssetSetService.MutateCampaignAssetSets
將地區群組素材資源組合附加至廣告活動。
或者,如要將地點群組素材資源組合附加至廣告群組,請改用
AdGroupAssetSetService.MutateAdGroupAssetSets
。
(選用) 將地點素材資源新增至靜態地點群組素材資源組合
只有在先前建立靜態地區群組素材資源組合時,才需要執行這個步驟。
- 使用
asset_set_asset
報表擷取系統為先前建立的地點同步素材資源組合自動產生的素材資源名稱。使用篩選功能,只擷取您想要的資產。
- 使用
AssetSetAssetService.MutateAssetSetAssets
將這些地點加入靜態地區群組素材資源組合。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[[["\u003cp\u003eLocation assets are automatically created after you create and attach a location sync asset set to the customer.\u003c/p\u003e\n"],["\u003cp\u003eCreate a location sync asset set by defining its type and location source (Business Profile, chain, or manual).\u003c/p\u003e\n"],["\u003cp\u003eIf needed, create a location group asset set (dynamic or static) to select a subset of location assets for a campaign or ad group.\u003c/p\u003e\n"],["\u003cp\u003eDynamic location group asset sets leverage Business Profile or chain features for filtering, while static ones require manual asset addition.\u003c/p\u003e\n"],["\u003cp\u003eAttach the location sync asset set to the customer and, optionally, the location group asset set to a campaign or ad group.\u003c/p\u003e\n"]]],[],null,["# Location assets\n\nUnlike other assets, location assets are automatically created by the Google Ads API\nafter you create an asset set. First, create a location sync asset set and\nattach it to the customer. Then, if you need to select a subset of the location\nassets in the asset set for a campaign or ad group, create a location group\nasset set and attach it to the campaign or ad group.\n\nCreate a location sync asset set and attach it to the customer\n--------------------------------------------------------------\n\n1. [Create a **location sync** asset set](#create-location-sync).\n2. [Attach it to a customer using\n `CustomerAssetSetService`](/google-ads/api/reference/rpc/v21/CustomerAssetSetService).\n\n### Create a location sync asset set\n\n1. Create a new [`AssetSet`](/google-ads/api/reference/rpc/v21/AssetSet).\n 1. Set `type` to [`LOCATION_SYNC`](/google-ads/api/reference/rpc/v21/AssetSetTypeEnum.AssetSetType#location_sync).\n 2. Set `location_set` to a new [`LocationSet`](/google-ads/api/reference/rpc/v21/LocationSet).\n2. In the new `LocationSet`,\n 1. Set `location_ownership_type` based on your use case:\n - Set it to [`BUSINESS_OWNER`](/google-ads/api/reference/rpc/v21/LocationOwnershipTypeEnum.LocationOwnershipType#business_owner) if you own the business location.\n - Set it to [`AFFILIATE`](/google-ads/api/reference/rpc/v21/LocationOwnershipTypeEnum.LocationOwnershipType#affiliate) if you don't own the business location, but sell your products there.\n 2. Set the `source` oneof field based on your use case:\n - Set `business_profile_location_set` if you want to sync with your locations in your [Google Business Profile](//www.google.com/business/) account.\n - Set `chain_location_set` if you want to sync with locations in specified chain IDs.\n - Set `maps_location_set` if you want to manually add locations using [Place IDs](/maps/documentation/places/web-service/place-id).\n\nAfter you complete these steps, the Google Ads API generates **location\nassets** and adds them to the created location sync asset set for you, similar\nto when you manually do so using\n[`AssetSetAssetService`](/google-ads/api/reference/rpc/v21/AssetSetAssetService). You don't need to\nmanipulate them unless you want to manually [add them to a static location\ngroup asset sets](#add-location-assets).\n\nOnly one active location sync asset set with\n([`status`](/google-ads/api/reference/rpc/v21/AssetSet#status) of\n[`ENABLED`](/google-ads/api/reference/rpc/v21/AssetSetStatusEnum.AssetSetStatus#enabled)) can exist\nfor a customer. If you need to create a different type of location sync asset\nset, remove the existing one first.\n\n### Attach the location sync asset set to a customer\n\nUse\n[`CustomerAssetSetService.MutateCustomerAssetSets`](/google-ads/api/reference/rpc/v21/CustomerAssetSetService/MutateCustomerAssetSets)\nto attach the location sync asset set in the previous section to your customer.\n\n(Optional) Create a location group asset set and attach it to a campaign or an ad group\n---------------------------------------------------------------------------------------\n\nA **location group** asset set is necessary only if you need to select a subset\nof location assets. This is due to campaigns and ad groups inheriting location\nassets from the customer level.\n\nLocation group asset sets contain a subset of location assets of the **location\nsync** asset set. You can dynamically create a location group asset set by\nleveraging some features of Google Business Profile (like filtering by labels)\nor chain IDs and chain locations. Alternatively, you can statically create a\nlocation group asset set.\n\n1. [Create a location group asset set](#create-location-group). The location group asset set can be **dynamic** or **static**.\n2. [Attach the asset set to a campaign using or to an ad group, depending on\n your need](#attach-location-group).\n3. [(Optional) Add the previously generated assets to the newly created static\n location group asset set](#add-location-assets).\n\nFor a given customer, you can create multiple dynamic or static location group\nasset sets.\n\n### Create a location group asset set\n\nCreate a new [`AssetSet`](/google-ads/api/reference/rpc/v21/AssetSet) and set\n`location_group_parent_asset_set_id` to the ID of the previously created\nlocation sync asset set.\n\nThen, set some fields based on whether you want to create a dynamic or static\nlocation group asset set.\n\n#### Dynamic asset sets\n\nDepending on the field you [set in `LocationSet`](#create-location-sync), set\nthe fields based on the following rule:\n\n| If you set the following field | Then set [type](/google-ads/api/reference/rpc/v21/AssetSet#type) to | And set this field as the [asset_set_source](/google-ads/api/reference/rpc/v21/AssetSet#asset_set_source) oneof field |\n|---------------------------------|---------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| `business_profile_location_set` | `BUSINESS_PROFILE_DYNAMIC_LOCATION_GROUP` | `business_profile_location_group` |\n| `chain_location_set` | `CHAIN_DYNAMIC_LOCATION_GROUP` | `chain_location_group` |\n\nIf you set `maps_location_set` when [creating the location sync asset\nset](#create-location-sync), you won't be able to create a dynamic location\ngroup asset set. This is because you've manually added locations by Place IDs\nand there are no filtering features you can use for this type of locations.\n\n#### Static asset sets\n\nSet [`type`](/google-ads/api/reference/rpc/v21/AssetSet#type) to\n[`STATIC_LOCATION_GROUP`](/google-ads/api/reference/rpc/v21/AssetSetTypeEnum.AssetSetType#static_location_group).\nYou can create static location group asset sets for any types of location\nsync asset sets, no matter what fields (`business_profile_location_set`,\n`chain_location_set`, or `maps_location_set`) you set in the\n[`LocationSet`](/google-ads/api/reference/rpc/v21/LocationSet#source).\n\nFor **static** location group asset sets, you need to\n[manually add the generated location assets to the location group asset\nsets](#add-location-assets).\n\n### Attach the asset set to a campaign or to an ad group\n\nUse\n[`CampaignAssetSetService.MutateCampaignAssetSets`](/google-ads/api/reference/rpc/v21/CampaignAssetSetService/MutateCampaignAssetSets)\nto attach the [location group asset set](#create-location-group) to your\ncampaign.\n\nAlternatively, use\n[`AdGroupAssetSetService.MutateAdGroupAssetSets`](/google-ads/api/reference/rpc/v21/AdGroupAssetSetService/MutateAdGroupAssetSets)\nif you want to attach the [location group asset set](#create-location-group) to\nan ad group instead.\n\n### (Optional) Add the location assets to the **static** location group asset set\n\nThis step is required only if you create a\n[static location group asset set](#static-asset-sets) previously.\n\n1. Use the [`asset_set_asset`](/google-ads/api/fields/v21/asset_set_asset) report to fetch the resource names of assets automatically generated for the [previously created location sync asset set](#create-location-sync). Use [filtering](/google-ads/api/docs/query/structure#where) to retrieve only the assets you want.\n2. Add them to the [static location group asset set](#static-asset-sets) using [`AssetSetAssetService.MutateAssetSetAssets`](/google-ads/api/reference/rpc/v21/AssetSetAssetService/MutateAssetSetAssets)."]]