Closed lambertbeekhuis closed 1 year ago
The structure should be like this:
Ad -> DiscoveryCarouselAdInfo -> AdDiscoveryCarouselCardAsset -> Asset -> DiscoveryCarouselCardAsset
You cannot store the DiscoveryCarouselCardAsset
object directly under AdDiscoveryCarouselCardAsset
.
You need to first create an Asset and an DiscoveryCarouselCardAsset.
Then, set the DiscoveryCarouselCardAsset
to the discovery_carousel_card_asset
field.
Ok, thanks. And what service do I need to upload/mutate the DiscoveryCarouselCardAsset?
An asset is stored like ` // Creates an asset operation. $assetOperation = new AssetOperation(); $assetOperation->setCreate($asset);
// Issues a mutate request to add the asset.
$assetServiceClient = $googleAdsClient->getAssetServiceClient();
$response = $assetServiceClient->mutateAssets(
$customerId,
[$assetOperation]
);
` How is the DiscoveryCarouselCardAsset stored?
You need to set the newly created DiscoveryCarouselCardAsset
object to the discovery_carousel_card_asset
field of Asset
.
So, when you use the AssetServiceClient to create Asset
, DiscoveryCarouselCardAsset
will be created together.
Thanks so much, been searching a whole that for it. That was the link the one I was missing!!
Sure. Let us know if you need any help in the future. :)
Hello,
I am using V12, and run in something I probably understand wrong.
I try to make a DiscoveryCampaign with the DiscoveryCarouselAdInfo This contains the AdDiscoveryCarouselCardAsset Which refers to a normal Asset???? - I would think it would require a DiscoveryCarouselCardAsset instead of a normal Asset.
And if I want to make a resource of DiscoveryCarouselCardAsset, I am missing the Service for this and the ServiceClient, so cannot make e resource of it, as I miss the services for this.
Probably I make a mistake, or is there something with the library? (missing services?)
Below code and response I am using
I get the response