Hi Team,
We are currently working on a project where we are integrating a component with Google Ads API. There are few queries that we had regarding the same.
We are also trying the below query to fetch the current status of an Ad :
The below query currently fetching all the disapproved ads for the given ad campaign.
string searchQuery = $@"
SELECT
ad_group_ad.ad.id,
ad_group_ad.ad.type,
ad_group_ad.policy_summary.approval_status,
ad_group_ad.policy_summary.policy_topic_entries
FROM ad_group_ad
WHERE
campaign.id = {campaignId}
AND ad_group_ad.policy_summary.approval_status = DISAPPROVED";
Could you please let us know if the above approach is correct ? Also If you could tell us if there are any better alternatives to the one mentioned above.
2) We are also trying to create an ImageAd where we are stuck in providing the media_file_Id.
customers/{customer_id}/mediaFiles/{media_file_id}
Below we are not sure what should be the value of media_file_id when we are initializing the MediaFile Property of ImageAd Object.
AdGroupAd adGroupAd = new AdGroupAd
{
AdGroup = ResourceNames.AdGroup(customerId, adGroupId),
// Optional: Set the status.
Status = AdGroupAdStatus.Paused,
Ad = new Ad
{
Name = "Image Ad KFC",
FinalUrls = { "
http://www.example.com/" + i },
ImageAd = new ImageAdInfo
{
Name = "KFC Ad with Image Wow!",
ImageUrl = "
https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg",
PixelHeight = 300,
PixelWidth = 400,
MediaFile = $"customers/{customerId}/mediaFiles/
{media_file_id}"
},
DisplayUrl = "
http://www.example.com/" + i,
}
};
3) We are also trying to target Ads using the location component of Google Ads. For that we are currently using the below code(C#), where we Must provide a "location Id" that we get from this Reference :
https://developers.google.com/google-ads/api/reference/data/geotargets. But when we see the UI on Google Ads Account, there we can mention a country, city, region or PostCode. I am also attaching a screenshot for the reference. How Exactly could we achieve the same thing via the API?
return new CampaignCriterion()
{
Campaign = campaignResourceName,
Location = new LocationInfo()
{
GeoTargetConstant = location.ToString()
}
};
Please let me know if you require anything else from our side. Eagerly waiting for your response.
Thanks and Regards,
Sumit Rayakwar