Re: Ids and mutating ads
Okay - thanks for the information, Anash. On Wednesday, June 13, 2018 at 12:38:26 PM UTC-5, Anash P. Oommen (AdWords API Team) wrote: > > Hi Greg, > > One instance I can think of is when you clone campaigns in the UI by > copy-paste. Ad IDs are reused AFAIK in that case. > > Cheers > Anash P. Oommen, > AdWords API Advisor. > > On Tuesday, June 12, 2018 at 2:53:15 PM UTC-4, GregT wrote: >> >> Okay - sorry for the confusion, Anash. I think my confusion came from how >> we would need an ad group id to identify AdGroupAds uniquely if ad ids are >> unique, and I forgot about shared ads because AdWords got rid of them 2 or >> 3 years ago. Are there cases where an ad id can be shared across ad groups >> nowadays? >> >> And sorry, I realized the criterion id uniqueness question was silly >> right after posting it, as I've definitely seen reused product partition >> and keyword ids across ad groups many times. >> >> Thanks again, >> Greg >> >> On Tuesday, June 12, 2018 at 12:56:38 PM UTC-5, Anash P. Oommen (AdWords >> API Team) wrote: >>> >>> Hi Greg, >>> >>> Yes, the way you read the documentation is correct. Ad Ids may be reused >>> across ad groups. As I mentioned in my previous post, AdGroupAd is not the >>> same thing as Ad. Ad is the actual underlying entity, and AdGroupAd is a >>> link that associates an AdGroup and an Ad. A typical example where you >>> might see AdId getting reused across AdGroups is when using is shared Ads. >>> >>> Cheers >>> Anash >>> >>> On Tuesday, June 12, 2018 at 1:01:24 PM UTC-4, GregT wrote: Hi Anash. Thanks for the quick reply and clearing that up. It makes sense. I will say that I've been using the API for years, and I've always taken that page on id uniqueness to mean that we had to be careful within our code and database to deal with the possibility that an ad id might be reused across ad groups even within a single account -- as that's the way the documentation reads to me. Maybe this is what you're saying you guys are planning on doing, but it seems like a better way to do the documentation is to have https://developers.google.com/adwords/api/docs/guides/objects-methods really list what it appears it's listing (what scope various ids are unique within), and document in the individual SOAP services whether or not you need to include something like AdGroupId in the get/set calls even though something like the ad id might be globally unique itself. So does this also mean that CriterionId (e.g. keyword and product partition ids) are also globally unique, even though the documentation says that the (AdGroupId, CriterionId) pair is what's globally unique (like it does with the [AdGroupId, AdId] pair)? Thanks, Greg On Tuesday, June 12, 2018 at 11:32:01 AM UTC-5, Anash P. Oommen (AdWords API Team) wrote: > > Hi Greg, > > We need to update the Unique IDs documentation a bit, now that > AdService is available. The more detailed version is like this: > > - AdId represents a globally unique creative ID. This means that you > can edit an Ad using AdService using creativeId without any concern of ID > collision. > > - AdGroupAd is a link that associates an Ad to an AdGroup. But we > don't expose an AdGroupAdId. You could use the pair (adgroupid, adid) as > a > proxy ID for AdGroupAd. Hence our warning that when querying using > AdGroupAdService.get, you should not consider adId to be a unique Id, you > should rather use the pair (adgroupid, adid) as a unique pair. > > So, you are fine if you follow these guidelines: > > 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique > ID for querying purposes. > 2. When using AdService.mutate, use adId as a unique ID for updating > the ad. > > Hope this helps? > > Cheers > Anash P. Oommen, > AdWords API Advisor. > > On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: >> >> Hi, >> >> I saw that in the recent v201806 release of the API, there is now the >> ability to mutate ads. This would make some things simpler for us where >> we're currently doing removal and adds to accomplish the same thing, so >> it'd be nice to use it. However, I'm a little hesitant, because >> something >> seems wrong about it. According to >> https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, >> >> you can mutate the Ad by using the new AdService, setting the id field >> of >> the Ad, setting whatever fields you want to change, and sending it with >> the >> SET operator. The part that worries me is that ad ids are not globally >> unique, even within a single account, but are unique only within an ad
Re: Ids and mutating ads
Hi Greg, One instance I can think of is when you clone campaigns in the UI by copy-paste. Ad IDs are reused AFAIK in that case. Cheers Anash P. Oommen, AdWords API Advisor. On Tuesday, June 12, 2018 at 2:53:15 PM UTC-4, GregT wrote: > > Okay - sorry for the confusion, Anash. I think my confusion came from how > we would need an ad group id to identify AdGroupAds uniquely if ad ids are > unique, and I forgot about shared ads because AdWords got rid of them 2 or > 3 years ago. Are there cases where an ad id can be shared across ad groups > nowadays? > > And sorry, I realized the criterion id uniqueness question was silly right > after posting it, as I've definitely seen reused product partition and > keyword ids across ad groups many times. > > Thanks again, > Greg > > On Tuesday, June 12, 2018 at 12:56:38 PM UTC-5, Anash P. Oommen (AdWords > API Team) wrote: >> >> Hi Greg, >> >> Yes, the way you read the documentation is correct. Ad Ids may be reused >> across ad groups. As I mentioned in my previous post, AdGroupAd is not the >> same thing as Ad. Ad is the actual underlying entity, and AdGroupAd is a >> link that associates an AdGroup and an Ad. A typical example where you >> might see AdId getting reused across AdGroups is when using is shared Ads. >> >> Cheers >> Anash >> >> On Tuesday, June 12, 2018 at 1:01:24 PM UTC-4, GregT wrote: >>> >>> Hi Anash. >>> >>> Thanks for the quick reply and clearing that up. It makes sense. >>> >>> I will say that I've been using the API for years, and I've always taken >>> that page on id uniqueness to mean that we had to be careful within our >>> code and database to deal with the possibility that an ad id might be >>> reused across ad groups even within a single account -- as that's the way >>> the documentation reads to me. Maybe this is what you're saying you guys >>> are planning on doing, but it seems like a better way to do the >>> documentation is to have >>> https://developers.google.com/adwords/api/docs/guides/objects-methods >>> really list what it appears it's listing (what scope various ids are unique >>> within), and document in the individual SOAP services whether or not you >>> need to include something like AdGroupId in the get/set calls even though >>> something like the ad id might be globally unique itself. >>> >>> So does this also mean that CriterionId (e.g. keyword and product >>> partition ids) are also globally unique, even though the documentation says >>> that the (AdGroupId, CriterionId) pair is what's globally unique (like it >>> does with the [AdGroupId, AdId] pair)? >>> >>> Thanks, >>> Greg >>> >>> >>> On Tuesday, June 12, 2018 at 11:32:01 AM UTC-5, Anash P. Oommen (AdWords >>> API Team) wrote: Hi Greg, We need to update the Unique IDs documentation a bit, now that AdService is available. The more detailed version is like this: - AdId represents a globally unique creative ID. This means that you can edit an Ad using AdService using creativeId without any concern of ID collision. - AdGroupAd is a link that associates an Ad to an AdGroup. But we don't expose an AdGroupAdId. You could use the pair (adgroupid, adid) as a proxy ID for AdGroupAd. Hence our warning that when querying using AdGroupAdService.get, you should not consider adId to be a unique Id, you should rather use the pair (adgroupid, adid) as a unique pair. So, you are fine if you follow these guidelines: 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique ID for querying purposes. 2. When using AdService.mutate, use adId as a unique ID for updating the ad. Hope this helps? Cheers Anash P. Oommen, AdWords API Advisor. On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: > > Hi, > > I saw that in the recent v201806 release of the API, there is now the > ability to mutate ads. This would make some things simpler for us where > we're currently doing removal and adds to accomplish the same thing, so > it'd be nice to use it. However, I'm a little hesitant, because something > seems wrong about it. According to > https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, > > you can mutate the Ad by using the new AdService, setting the id field of > the Ad, setting whatever fields you want to change, and sending it with > the > SET operator. The part that worries me is that ad ids are not globally > unique, even within a single account, but are unique only within an ad > group ( > https://developers.google.com/adwords/api/docs/guides/objects-methods). > So, it seems unsafe and error prone to be able to modify an ad by > specifying just its id, as you could have more than one ad in your > account > with that id, leading to
Re: Ids and mutating ads
Okay - sorry for the confusion, Anash. I think my confusion came from how we would need an ad group id to identify AdGroupAds uniquely if ad ids are unique, and I forgot about shared ads because AdWords got rid of them 2 or 3 years ago. Are there cases where an ad id can be shared across ad groups nowadays? And sorry, I realized the criterion id uniqueness question was silly right after posting it, as I've definitely seen reused product partition and keyword ids across ad groups many times. Thanks again, Greg On Tuesday, June 12, 2018 at 12:56:38 PM UTC-5, Anash P. Oommen (AdWords API Team) wrote: > > Hi Greg, > > Yes, the way you read the documentation is correct. Ad Ids may be reused > across ad groups. As I mentioned in my previous post, AdGroupAd is not the > same thing as Ad. Ad is the actual underlying entity, and AdGroupAd is a > link that associates an AdGroup and an Ad. A typical example where you > might see AdId getting reused across AdGroups is when using is shared Ads. > > Cheers > Anash > > On Tuesday, June 12, 2018 at 1:01:24 PM UTC-4, GregT wrote: >> >> Hi Anash. >> >> Thanks for the quick reply and clearing that up. It makes sense. >> >> I will say that I've been using the API for years, and I've always taken >> that page on id uniqueness to mean that we had to be careful within our >> code and database to deal with the possibility that an ad id might be >> reused across ad groups even within a single account -- as that's the way >> the documentation reads to me. Maybe this is what you're saying you guys >> are planning on doing, but it seems like a better way to do the >> documentation is to have >> https://developers.google.com/adwords/api/docs/guides/objects-methods >> really list what it appears it's listing (what scope various ids are unique >> within), and document in the individual SOAP services whether or not you >> need to include something like AdGroupId in the get/set calls even though >> something like the ad id might be globally unique itself. >> >> So does this also mean that CriterionId (e.g. keyword and product >> partition ids) are also globally unique, even though the documentation says >> that the (AdGroupId, CriterionId) pair is what's globally unique (like it >> does with the [AdGroupId, AdId] pair)? >> >> Thanks, >> Greg >> >> >> On Tuesday, June 12, 2018 at 11:32:01 AM UTC-5, Anash P. Oommen (AdWords >> API Team) wrote: >>> >>> Hi Greg, >>> >>> We need to update the Unique IDs documentation a bit, now that AdService >>> is available. The more detailed version is like this: >>> >>> - AdId represents a globally unique creative ID. This means that you can >>> edit an Ad using AdService using creativeId without any concern of ID >>> collision. >>> >>> - AdGroupAd is a link that associates an Ad to an AdGroup. But we don't >>> expose an AdGroupAdId. You could use the pair (adgroupid, adid) as a proxy >>> ID for AdGroupAd. Hence our warning that when querying using >>> AdGroupAdService.get, you should not consider adId to be a unique Id, you >>> should rather use the pair (adgroupid, adid) as a unique pair. >>> >>> So, you are fine if you follow these guidelines: >>> >>> 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique ID >>> for querying purposes. >>> 2. When using AdService.mutate, use adId as a unique ID for updating the >>> ad. >>> >>> Hope this helps? >>> >>> Cheers >>> Anash P. Oommen, >>> AdWords API Advisor. >>> >>> On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: Hi, I saw that in the recent v201806 release of the API, there is now the ability to mutate ads. This would make some things simpler for us where we're currently doing removal and adds to accomplish the same thing, so it'd be nice to use it. However, I'm a little hesitant, because something seems wrong about it. According to https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, you can mutate the Ad by using the new AdService, setting the id field of the Ad, setting whatever fields you want to change, and sending it with the SET operator. The part that worries me is that ad ids are not globally unique, even within a single account, but are unique only within an ad group ( https://developers.google.com/adwords/api/docs/guides/objects-methods). So, it seems unsafe and error prone to be able to modify an ad by specifying just its id, as you could have more than one ad in your account with that id, leading to modifying the wrong ad or an error (if the AdWords API is checking for this and returning a SOAP fault for it)? Or am I missing something? Thanks in advance, Greg >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/
Re: Ids and mutating ads
Hi Greg, Yes, the way you read the documentation is correct. Ad Ids may be reused across ad groups. As I mentioned in my previous post, AdGroupAd is not the same thing as Ad. Ad is the actual underlying entity, and AdGroupAd is a link that associates an AdGroup and an Ad. A typical example where you might see AdId getting reused across AdGroups is when using is shared Ads. Cheers Anash On Tuesday, June 12, 2018 at 1:01:24 PM UTC-4, GregT wrote: > > Hi Anash. > > Thanks for the quick reply and clearing that up. It makes sense. > > I will say that I've been using the API for years, and I've always taken > that page on id uniqueness to mean that we had to be careful within our > code and database to deal with the possibility that an ad id might be > reused across ad groups even within a single account -- as that's the way > the documentation reads to me. Maybe this is what you're saying you guys > are planning on doing, but it seems like a better way to do the > documentation is to have > https://developers.google.com/adwords/api/docs/guides/objects-methods > really list what it appears it's listing (what scope various ids are unique > within), and document in the individual SOAP services whether or not you > need to include something like AdGroupId in the get/set calls even though > something like the ad id might be globally unique itself. > > So does this also mean that CriterionId (e.g. keyword and product > partition ids) are also globally unique, even though the documentation says > that the (AdGroupId, CriterionId) pair is what's globally unique (like it > does with the [AdGroupId, AdId] pair)? > > Thanks, > Greg > > > On Tuesday, June 12, 2018 at 11:32:01 AM UTC-5, Anash P. Oommen (AdWords > API Team) wrote: >> >> Hi Greg, >> >> We need to update the Unique IDs documentation a bit, now that AdService >> is available. The more detailed version is like this: >> >> - AdId represents a globally unique creative ID. This means that you can >> edit an Ad using AdService using creativeId without any concern of ID >> collision. >> >> - AdGroupAd is a link that associates an Ad to an AdGroup. But we don't >> expose an AdGroupAdId. You could use the pair (adgroupid, adid) as a proxy >> ID for AdGroupAd. Hence our warning that when querying using >> AdGroupAdService.get, you should not consider adId to be a unique Id, you >> should rather use the pair (adgroupid, adid) as a unique pair. >> >> So, you are fine if you follow these guidelines: >> >> 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique ID >> for querying purposes. >> 2. When using AdService.mutate, use adId as a unique ID for updating the >> ad. >> >> Hope this helps? >> >> Cheers >> Anash P. Oommen, >> AdWords API Advisor. >> >> On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: >>> >>> Hi, >>> >>> I saw that in the recent v201806 release of the API, there is now the >>> ability to mutate ads. This would make some things simpler for us where >>> we're currently doing removal and adds to accomplish the same thing, so >>> it'd be nice to use it. However, I'm a little hesitant, because something >>> seems wrong about it. According to >>> https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, >>> >>> you can mutate the Ad by using the new AdService, setting the id field of >>> the Ad, setting whatever fields you want to change, and sending it with the >>> SET operator. The part that worries me is that ad ids are not globally >>> unique, even within a single account, but are unique only within an ad >>> group ( >>> https://developers.google.com/adwords/api/docs/guides/objects-methods). >>> So, it seems unsafe and error prone to be able to modify an ad by >>> specifying just its id, as you could have more than one ad in your account >>> with that id, leading to modifying the wrong ad or an error (if the AdWords >>> API is checking for this and returning a SOAP fault for it)? Or am I >>> missing something? >>> >>> Thanks in advance, >>> Greg >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit
Re: Ids and mutating ads
Hi Anash. Thanks for the quick reply and clearing that up. It makes sense. I will say that I've been using the API for years, and I've always taken that page on id uniqueness to mean that we had to be careful within our code and database to deal with the possibility that an ad id might be reused across ad groups even within a single account -- as that's the way the documentation reads to me. Maybe this is what you're saying you guys are planning on doing, but it seems like a better way to do the documentation is to have https://developers.google.com/adwords/api/docs/guides/objects-methods really list what it appears it's listing (what scope various ids are unique within), and document in the individual SOAP services whether or not you need to include something like AdGroupId in the get/set calls even though something like the ad id might be globally unique itself. So does this also mean that CriterionId (e.g. keyword and product partition ids) are also globally unique, even though the documentation says that the (AdGroupId, CriterionId) pair is what's globally unique (like it does with the [AdGroupId, AdId] pair)? Thanks, Greg On Tuesday, June 12, 2018 at 11:32:01 AM UTC-5, Anash P. Oommen (AdWords API Team) wrote: > > Hi Greg, > > We need to update the Unique IDs documentation a bit, now that AdService > is available. The more detailed version is like this: > > - AdId represents a globally unique creative ID. This means that you can > edit an Ad using AdService using creativeId without any concern of ID > collision. > > - AdGroupAd is a link that associates an Ad to an AdGroup. But we don't > expose an AdGroupAdId. You could use the pair (adgroupid, adid) as a proxy > ID for AdGroupAd. Hence our warning that when querying using > AdGroupAdService.get, you should not consider adId to be a unique Id, you > should rather use the pair (adgroupid, adid) as a unique pair. > > So, you are fine if you follow these guidelines: > > 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique ID > for querying purposes. > 2. When using AdService.mutate, use adId as a unique ID for updating the > ad. > > Hope this helps? > > Cheers > Anash P. Oommen, > AdWords API Advisor. > > On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: >> >> Hi, >> >> I saw that in the recent v201806 release of the API, there is now the >> ability to mutate ads. This would make some things simpler for us where >> we're currently doing removal and adds to accomplish the same thing, so >> it'd be nice to use it. However, I'm a little hesitant, because something >> seems wrong about it. According to >> https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, >> >> you can mutate the Ad by using the new AdService, setting the id field of >> the Ad, setting whatever fields you want to change, and sending it with the >> SET operator. The part that worries me is that ad ids are not globally >> unique, even within a single account, but are unique only within an ad >> group ( >> https://developers.google.com/adwords/api/docs/guides/objects-methods). >> So, it seems unsafe and error prone to be able to modify an ad by >> specifying just its id, as you could have more than one ad in your account >> with that id, leading to modifying the wrong ad or an error (if the AdWords >> API is checking for this and returning a SOAP fault for it)? Or am I >> missing something? >> >> Thanks in advance, >> Greg >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/1ff95f08-e74f-4d96-aef6-20a9eb01bdef%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Ids and mutating ads
Hi Greg, We need to update the Unique IDs documentation a bit, now that AdService is available. The more detailed version is like this: - AdId represents a globally unique creative ID. This means that you can edit an Ad using AdService using creativeId without any concern of ID collision. - AdGroupAd is a link that associates an Ad to an AdGroup. But we don't expose an AdGroupAdId. You could use the pair (adgroupid, adid) as a proxy ID for AdGroupAd. Hence our warning that when querying using AdGroupAdService.get, you should not consider adId to be a unique Id, you should rather use the pair (adgroupid, adid) as a unique pair. So, you are fine if you follow these guidelines: 1. When using AdGroupAdService.get, use (adGroupid, adId) as a unique ID for querying purposes. 2. When using AdService.mutate, use adId as a unique ID for updating the ad. Hope this helps? Cheers Anash P. Oommen, AdWords API Advisor. On Tuesday, June 12, 2018 at 12:22:00 AM UTC-4, GregT wrote: > > Hi, > > I saw that in the recent v201806 release of the API, there is now the > ability to mutate ads. This would make some things simpler for us where > we're currently doing removal and adds to accomplish the same thing, so > it'd be nice to use it. However, I'm a little hesitant, because something > seems wrong about it. According to > https://developers.google.com/adwords/api/docs/guides/ad-features#mutating_ads_for_v201806_and_later, > > you can mutate the Ad by using the new AdService, setting the id field of > the Ad, setting whatever fields you want to change, and sending it with the > SET operator. The part that worries me is that ad ids are not globally > unique, even within a single account, but are unique only within an ad > group ( > https://developers.google.com/adwords/api/docs/guides/objects-methods). > So, it seems unsafe and error prone to be able to modify an ad by > specifying just its id, as you could have more than one ad in your account > with that id, leading to modifying the wrong ad or an error (if the AdWords > API is checking for this and returning a SOAP fault for it)? Or am I > missing something? > > Thanks in advance, > Greg > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e9109f68-3ba0-4f9d-9dd2-f57d67f69576%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.