Best practice suggestions to avoid DUPLICATE_ADGROUP_NAME
Hello everyone, I'm building an app that's adding AdGroups to Campaigns. The Campaign I'll be working with wont be new, I wont be creating it so I don't know what AdGroups already exist. Obviously I need to avoid DUPLICATE_ADGROUP_NAME as this will interrupt my process. I can think of two ways of tackling this potential problem: 1. *Before* running my process, pull the current AdGroups down to a local database and compare the titles before creating new AdGroups through the API 2. *During* the process use the API to pull the current AdGroups down and compare the titles before creating new AdGroups through the API Both of these workarounds seem a bit long winded, not to mention the additional resources required. Can anyone else suggest a more elegant alternative to avoiding DUPLICATE_ADGROUP_NAME ? Many thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Best practice suggestions to avoid DUPLICATE_ADGROUP_NAME
Thanks Zweitze, Very helpful. So it's about handling errors, which I'm not doing at the moment. Thanks again for your help. On Tuesday, February 26, 2013 12:12:34 PM UTC, Zweitze wrote: 3. After adding a group see if DUPLICATE_ADGROUP_NAME occurred and act accordingly. For most languages you'll need to implement an exception handler. It's safer than your solutions, which assume that nothing changes after you retrieve a list of ad group names. Hope this helps. On Tuesday, February 26, 2013 12:53:48 PM UTC+1, Alan Coleman wrote: Hello everyone, I'm building an app that's adding AdGroups to Campaigns. The Campaign I'll be working with wont be new, I wont be creating it so I don't know what AdGroups already exist. Obviously I need to avoid DUPLICATE_ADGROUP_NAME as this will interrupt my process. I can think of two ways of tackling this potential problem: 1. *Before* running my process, pull the current AdGroups down to a local database and compare the titles before creating new AdGroups through the API 2. *During* the process use the API to pull the current AdGroups down and compare the titles before creating new AdGroups through the API Both of these workarounds seem a bit long winded, not to mention the additional resources required. Can anyone else suggest a more elegant alternative to avoiding DUPLICATE_ADGROUP_NAME ? Many thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Best practice suggestions to avoid DUPLICATE_ADGROUP_NAME
Another alternative would be to encode the date/timestamp into the adgroup name. It is still good to have some exception handling in place. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Best practice suggestions to avoid DUPLICATE_ADGROUP_NAME
Hi Alan, You could make a call and see if DUPLICATE_ADGROUP_NAME error occurs. You could make the call using validateOnly headers as true, so the adgroup is not created if the name is available. That will cut your risk of name conflicts considerably, but you could still be unfortunate enough to hit the error if someone were to say, update the adgroup through another application (e.g. AdWords Editor) during that small window of time. So you should also have proper error handling in place to handle such cases. Cheers, Anash P. Oommen, AdWords API Advisor. On Tuesday, February 26, 2013 5:23:48 PM UTC+5:30, Alan Coleman wrote: Hello everyone, I'm building an app that's adding AdGroups to Campaigns. The Campaign I'll be working with wont be new, I wont be creating it so I don't know what AdGroups already exist. Obviously I need to avoid DUPLICATE_ADGROUP_NAME as this will interrupt my process. I can think of two ways of tackling this potential problem: 1. *Before* running my process, pull the current AdGroups down to a local database and compare the titles before creating new AdGroups through the API 2. *During* the process use the API to pull the current AdGroups down and compare the titles before creating new AdGroups through the API Both of these workarounds seem a bit long winded, not to mention the additional resources required. Can anyone else suggest a more elegant alternative to avoiding DUPLICATE_ADGROUP_NAME ? Many thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.