Reg: Image Ad

46 views
Skip to first unread message

Suresh Kumar Shenbagam

unread,
Aug 19, 2019, 5:53:09 AM8/19/19
to AdWords API and Google Ads API Forum
Hi,

We are writing an adapter for Google Ads using Adwords Java API.
I am able to create Image Ad using Adwords Java API. And I have uploaded an image to the image ad.
And I know, that I cannot update the image after creation. But there are some fields which can be updated are name, final URL.
Once Image ad created, the adId will be a unique id which is returned from API and we are storing that Id our DB.

So, if the user goes to Google Ads and update the name or final URL for an image ad, then a new adId has been created which is different from the one we stored earlier.
We need to keep in sync in our application what has been updated on Google Ads side, so we are trying to fetch the ad details using adId, but incase of Image Ad, the adId has been created as new, we lost track. And we are unable to fetch the Image Ad based on the adId we stored earlier.

Is there any other uniqueId for an Image Ad from which we can retrieve the Image Ad details. Or if there is an alternate / better way, please provide the same.
Please let me know, if the question is not clear.  

Suresh

Google Ads API Forum Advisor Prod

unread,
Aug 19, 2019, 6:09:18 AM8/19/19
to adwor...@googlegroups.com
Hi Suresh,

In the AdWords API, you should be able to update the fields of the ImageAd using the AdService.mutate() method. You need only to pass the Id of the said ad and the fields you wish to modify. After the request, the Id should remain the same.

For retrieving the ImageAd details, you can use either the AdGroupAdService.get() or the AdService.get() methods. Please also note that the AdGroupAdService is only for ADD operations and for updating the Status field, while the AdService serves as the one used for updating the other fields of the supported ads of the AdWords API.

Let me know if this helps.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UEJTrl:ref

Suresh Kumar Shenbagam

unread,
Aug 20, 2019, 12:58:16 AM8/20/19
to AdWords API and Google Ads API Forum
Hi Peter,

Thanks for the reply. I understand that I can update the ImageAds using AdService using Adwords API. But my question is, after creating the Image Ad using AdWords JAVA API, am getting some adId for the newly created Image Ad and am persisting this adId for future purpose.

After that, if someone goes to Google Ads UI, open that newly created Image Ad, doing some changes and saving the Image Ad, In this case, it is creating a new adId which I am not aware of or my application does not aware of.

For example, this is the url for viewing/editing the Image Ad,

Please note the adId parameter in the above  URL and I am able to open the Image Ad using the above URL. After opening, if I make some changes like updating the finalURL or name, then it is creating a new Image Ad with new adId. 

So, I have stored some adId earlier (while creation), but here after this changes, new adId is different from stored one. Is there any link/connection between the old and new adId?

I want you to try these steps to replicate the problem,
1. Create a new Image Ad using Adwords Java API and note down the adId.
2. Login to Google Ads UI and edit the newly created Image Ad and Save. Note the adId now, both are different
3. So, if i want to read the Image Ad using adId which has been already stored, it returns null, since it could not find the Image Ad for the adId.

I hope you understand the problem now.
 

Suresh

Google Ads API Forum Advisor Prod

unread,
Aug 20, 2019, 1:35:02 AM8/20/19
to adwor...@googlegroups.com
Hi Suresh,

Thank you for providing additional information about the scenario. However, my apologies as I would not be able to comment further regarding the behavior you have observed via the Google Ads UI as this is already outside of our scope. That being said, I would recommend that you reach out to the product experts via the Google Ads Community Forum for further guidance.

Best regards,
Reply all
Reply to author
Forward
0 new messages