فیدهای صفحه تبلیغات جستجوی پویا
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
بهطور پیشفرض، تبلیغات جستجوی پویا (DSA) به گونهای تنظیم میشوند که کل وبسایتها یا بخشهایی از آنها را بدون تمرکز بر URLهای صفحه خاصی هدف قرار دهند. اگر به کنترل بهتر بر روی URL ها نیاز دارید، می توانید از فیدهای صفحه DSA برای تعیین دقیق آدرس هایی که با DSA های خود استفاده کنید استفاده کنید. هنگامی که یک فید صفحه از محصولات خود و صفحات فرود آنها ارائه می دهید، به Google Ads کمک می کند تا تعیین کند چه زمانی تبلیغات شما را نشان دهد و افراد را به کجا هدایت کند.
این راهنما به شما نحوه ایجاد فیدهای صفحه DSA مبتنی بر دارایی را نشان می دهد.
برای هر صفحه در وب سایت خود دارایی ایجاد کنید
ابتدا برای هر URL در وب سایت خود یک Asset ایجاد کنید.
defcreate_assets(client:GoogleAdsClient,customer_id:str,dsa_page_url_label:str)-> List[str]:"""Creates assets to be used in a DSA page feed. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. dsa_page_url_label: the label for the DSA page URLs. Returns: a list of the created assets' resource names. """urls:List[str]=["http://www.example.com/discounts/rental-cars","http://www.example.com/discounts/hotel-deals","http://www.example.com/discounts/flight-deals",]operations:List[AssetOperation]=[]# Creates one asset per URL.forurlinurls:# Creates an asset operation and adds it to the list of operations.operation:AssetOperation=client.get_type("AssetOperation")asset:Asset=operation.createpage_feed_asset:PageFeedAsset=asset.page_feed_assetpage_feed_asset.page_url=url# Recommended: adds labels to the asset. These labels can be used later# in ad group targeting to restrict the set of pages that can serve.page_feed_asset.labels.append(dsa_page_url_label)operations.append(operation)# Issues a mutate request to add the assets and prints its information.asset_service:AssetServiceClient=client.get_service("AssetService")response:MutateAssetsResponse=asset_service.mutate_assets(customer_id=customer_id,operations=operations)print(f"Added {len(response.results)} assets:")resource_names:List[str]=[]result:MutateAssetResultforresultinresponse.results:resource_name:str=result.resource_nameprint(f"\tCreated an asset with resource name: '{resource_name}'")resource_names.append(resource_name)returnresource_names
defcreate_assets(client,dsa_page_url_label,customer_id)urls=['http://www.example.com/discounts/rental-cars','http://www.example.com/discounts/hotel-deals','http://www.example.com/discounts/flight-deals',]operations=urls.mapdo|url|client.operation.create_resource.assetdo|asset|asset.page_feed_asset=client.resource.page_feed_assetdo|pfa|# Sets the URL of the page to include.pfa.page_url=url# Recommended: adds labels to the asset. These labels can be used later# in ad group targeting to restrict the set of pages that can serve.pfa.labels << dsa_page_url_labelendendendresponse=client.service.asset.mutate_assets(customer_id:customer_id,operations:operations,)resource_names=[]response.results.eachdo|result|resource_name=result.resource_nameputs"Created asset with resource name '#{resource_name}'"resource_names << resource_nameendresource_namesend
my$urls=["http://www.example.com/discounts/rental-cars","http://www.example.com/discounts/hotel-deals","http://www.example.com/discounts/flight-deals"];# Create one operation per URL.my$asset_operations=[];foreachmy$url(@$urls){my$page_feed_asset=Google::Ads::GoogleAds::V22::Common::PageFeedAsset->new({# Set the URL of the page to include.pageUrl=>$url,# Recommended: add labels to the asset. These labels can be used later in# ad group targeting to restrict the set of pages that can serve.labels=>[$dsa_page_url_label]});my$asset=Google::Ads::GoogleAds::V22::Resources::Asset->new({pageFeedAsset=>$page_feed_asset});push@$asset_operations,Google::Ads::GoogleAds::V22::Services::AssetService::AssetOperation->new({create=>$asset});}# Add the assets.my$response=$api_client->AssetService()->mutate({customerId=>$customer_id,operations=>$asset_operations});# Print some information about the response.my$resource_names=[];foreachmy$result(@{$response->{results}}){push@$resource_names,$result->{resourceName};printf"Created asset with resource name '%s'.\n",$result->{resourceName};}return$resource_names;
در مرحله بعد، مجموعه ای از دارایی ها به نام AssetSet را ایجاد کنید. این گروه بندی نشان دهنده تمام URL هایی است که باید برای یک کمپین خاص در نظر گرفته شوند. یک Asset می تواند در چندین شیء AssetSet باشد.
defcreate_asset_set(client:GoogleAdsClient,customer_id:str)-> str:"""Creates an asset set. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. Returns: the created asset set's resource name. """operation:AssetSetOperation=client.get_type("AssetSetOperation")# Creates an asset set which will be used to link the dynamic page feed# assets to a campaign.asset_set:AssetSet=operation.createasset_set.name=f"My dynamic page feed {get_printable_datetime()}"asset_set.type_=client.enums.AssetSetTypeEnum.PAGE_FEED# Issues a mutate request to add the asset set and prints its information.asset_set_service:AssetSetServiceClient=client.get_service("AssetSetService")response:MutateAssetSetsResponse=asset_set_service.mutate_asset_sets(customer_id=customer_id,operations=[operation])resource_name:str=response.results[0].resource_nameprint(f"Created an asset set with resource name: '{resource_name}'")returnresource_name
defcreate_asset_set(client,customer_id)# Creates an AssetSet which will be used to link the dynamic page feed assets to a campaign.# Creates an operation to add the AssetSet.operation=client.operation.create_resource.asset_setdo|asset_set|asset_set.name="My dynamic page feed #{Time.now}"asset_set.type=:PAGE_FEEDend# Sends the mutate request.response=client.service.asset_set.mutate_asset_sets(customer_id:customer_id,operations:[operation],)# Prints some information about the response.resource_name=response.results.first.resource_nameputs"Created asset set with resource name '#{resource_name}'"resource_nameend
# Create an AssetSet which will be used to link the dynamic page feed assets to# a campaign.my$asset_set=Google::Ads::GoogleAds::V22::Resources::AssetSet->new({name=>"My dynamic page feed #".uniqid(),type=>PAGE_FEED});# Create an operation to add the AssetSet.my$operation=Google::Ads::GoogleAds::V22::Services::AssetSetService::AssetSetOperation->
new({create=>$asset_set});# Send the mutate request.my$response=$api_client->AssetSetService()->mutate({customerId=>$customer_id,operations=>[$operation]});# Print some information about the response.my$resource_name=$response->{results}[0]{resourceName};printf"Created asset set with resource name '%s'.\n",$resource_name;return$resource_name;
defadd_assets_to_asset_set(client:GoogleAdsClient,customer_id:str,asset_resource_names:List[str],asset_set_resource_name:str,)-> None:"""Adds assets to an asset set by creating an asset set asset link. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. asset_resource_names: a list of asset resource names. asset_set_resource_name: a resource name for an asset set. """operations:List[AssetSetAssetOperation]=[]forresource_nameinasset_resource_names:# Creates an asset set asset operation and adds it to the list of# operations.operation:AssetSetAssetOperation=client.get_type("AssetSetAssetOperation")asset_set_asset:AssetSetAsset=operation.createasset_set_asset.asset=resource_nameasset_set_asset.asset_set=asset_set_resource_nameoperations.append(operation)# Issues a mutate request to add the asset set assets and prints its# information.asset_set_asset_service:AssetSetAssetServiceClient=client.get_service("AssetSetAssetService")response:MutateAssetSetAssetsResponse=(asset_set_asset_service.mutate_asset_set_assets(customer_id=customer_id,operations=operations))print(f"Added {len(response.results)} asset set assets:")result:MutateAssetSetAssetResultforresultinresponse.results:print("\tCreated an asset set asset link with resource name "f"'{result.resource_name}'")
defadd_assets_to_asset_set(client,asset_resource_names,asset_set_resource_name,customer_id)operations=asset_resource_names.mapdo|asset_resource_name|client.operation.create_resource.asset_set_assetdo|asa|asa.asset=asset_resource_nameasa.asset_set=asset_set_resource_nameendendresponse=client.service.asset_set_asset.mutate_asset_set_assets(customer_id:customer_id,operations:operations,)resource_name=response.results.first.resource_nameputs"Created asset set asset with resource name '#{resource_name}'"end
my$operations=[];foreachmy$asset_resource_name(@$asset_resource_names){my$asset_set_asset=Google::Ads::GoogleAds::V22::Resources::AssetSetAsset->new({asset=>$asset_resource_name,assetSet=>$asset_set_resource_name});# Create an operation to add the link.my$operation=Google::Ads::GoogleAds::V22::Services::AssetSetAssetService::AssetSetAssetOperation->new({create=>$asset_set_asset});push@$operations,$operation;}# Send the mutate request.my$response=$api_client->AssetSetAssetService()->mutate({customerId=>$customer_id,operations=>$operations});# Print some information about the response.my$resource_name=$response->{results}[0]{resourceName};printf"Created AssetSetAsset link with resource name '%s'.\n",$resource_name;
deflink_asset_set_to_campaign(client:GoogleAdsClient,customer_id:str,campaign_id:str,asset_set_resource_name:str,)-> None:"""Links the asset set to the campaign by creating a campaign asset set. Args: client: an initialized GoogleAdsClient instance. customer_id: a client customer ID. campaign_id: the ID for a Campaign. asset_set_resource_name: a resource name for an asset set. """googleads_service:GoogleAdsServiceClient=client.get_service("GoogleAdsService")# Creates a campaign asset set representing the link between an asset set# and a campaign.operation:CampaignAssetSetOperation=client.get_type("CampaignAssetSetOperation")campaign_asset_set:CampaignAssetSet=operation.createcampaign_asset_set.asset_set=asset_set_resource_namecampaign_asset_set.campaign=googleads_service.campaign_path(customer_id,campaign_id)campaign_asset_set_service:CampaignAssetSetServiceClient=(client.get_service("CampaignAssetSetService"))response:MutateCampaignAssetSetsResponse=(campaign_asset_set_service.mutate_campaign_asset_sets(customer_id=customer_id,operations=[operation]))resource_name:str=response.results[0].resource_nameprint(f"Created a campaign asset set with resource name: '{resource_name}'")
deflink_asset_set_to_campaign(client,asset_set_resource_name,customer_id,campaign_id)# Creates a CampaignAssetSet representing the link between an AssetSet and a Campaign.# Creates an operation to add the CampaignAssetSet.operation=client.operation.create_resource.campaign_asset_setdo|cas|cas.campaign=client.path.campaign(customer_id,campaign_id)cas.asset_set=asset_set_resource_nameend# Issues the mutate request.response=client.service.campaign_asset_set.mutate_campaign_asset_sets(customer_id:customer_id,operations:[operation],)resource_name=response.results.first.resource_nameputs"Created a campaign asset set with resource name '#{resource_name}'"end
# Create a CampaignAssetSet representing the link between an AssetSet and a Campaign.my$campaign_asset_set=Google::Ads::GoogleAds::V22::Resources::CampaignAssetSet->new({campaign=>Google::Ads::GoogleAds::V22::Utils::ResourceNames::campaign($customer_id,$campaign_id),assetSet=>$asset_set_resource_name});# Create an operation to add the CampaignAssetSet.my$operation=Google::Ads::GoogleAds::V22::Services::CampaignAssetSetService::CampaignAssetSetOperation->new({create=>$campaign_asset_set});# Issue the mutate request.my$response=$api_client->CampaignAssetSetService()->mutate({customerId=>$customer_id,operations=>[$operation]});# Print some information about the response.my$resource_name=$response->{results}[0]{resourceName};printf"Created a CampaignAssetSet with resource name '%s'.\n",$resource_name;
توصیه می شود: URL های فید صفحه را با استفاده از برچسب های سفارشی هدف قرار دهید
میتوانید بهصورت اختیاری از برچسبهای سفارشی برای هدفگیری و ارائه پیشنهاد بر روی URLها در فید صفحه استفاده کنید. این را می توان با ایجاد یک معیار بر اساس WebpageInfo انجام داد که با استفاده از یک شرط فیلتر می کند که operand آن به عنوان WebpageConditionOperand.CUSTOM_LABEL تنظیم شده است.
تاریخ آخرین بهروزرسانی 2025-12-22 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-12-22 بهوقت ساعت هماهنگ جهانی."],[],[]]