Rename Adgroup-titles in Bulk

1,376 views
Skip to first unread message

Q-mark

unread,
Sep 21, 2015, 8:06:47 AM9/21/15
to AdWords Scripts Forum
Dear Adwords experts,

I would like to rename all my adgroups (1000+) to get a consistent adgroup structure (and make analysing/ optimizing easier). I got the account from somebody who made a mess out of it.
All related adgroups for the same product got different adgroup-names which makes analysing and optimizing diffilcult. I would like to rename these adgroups and bundle adgroups that are related or promoting the same product.
I've tried to bundle them by using the final url's of the ads as adgroup names and strip the URL after, but this got to complicated.

Any ideas how to rename and relate adgroups in bulk?


Adgroup situation now (same product):
blue cars
blue cars #2
cars blue
cars clue color #2
blue car
etc etc

Preferred situation: all related adgroups have the same basic name
Blue cars
Blue cars #2
Blue cars #3
Blue cars #4
Green cars
Green cars #2
Green cars #3
etc etc

In the preferred situation the Adgroups are nicely grouped and alphabetically ordered.


Is there a way to group existing adgroup-titles in bulk?


Many thanks in advance for ideas & help!!

Tyler Sidell (AdWords Scripts Team)

unread,
Sep 21, 2015, 2:19:31 PM9/21/15
to AdWords Scripts Forum
Hi,

You may want to look at Bulk Uploads. Since you are trying to make relate many of these names based on specific criteria, this may be the best route.  The simplest way to get started with Bulk Uploads is to use the following snippet:
var file = DriveApp.getFilesByName("BulkCampaignUpload.csv")
 
.next();
var upload = AdWordsApp.bulkUploads().newFileUpload(file);
upload
.forCampaignManagement();
upload
.preview();

Where BulkCampaignUpload.csv would be a Drive file with all of your necessary changes.

Thanks,
Tyler Sidell
AdWords Scripts Team

H.W.F. van den Beld

unread,
Sep 21, 2015, 2:30:48 PM9/21/15
to Tyler Sidell (AdWords Scripts Team) via AdWords Scripts Forum
Hi Tyler,

Thanks a lot!!

But:
1) how do I bundle the groups? In your example I still would have to group them manually, right?
2) and how do I make the csv to change (overwrite) groupname A for B?

Thanks for your help!
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/sttPRajqdpg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/48e4c0f1-f1ed-44ba-96b2-15566221804d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tyler Sidell (AdWords Scripts Team)

unread,
Sep 21, 2015, 3:38:03 PM9/21/15
to AdWords Scripts Forum
Hi,

Not a problem.  You would have to bundle the groups manually.  Also, if you want to make the change to the adGroup name:
  1. Go to your Campaign -> Ad Groups -> Edit -> Download Spreadsheet.  
  2. Make the changes to the appropriate ad group name
  3. Upload the CSV through a bulk upload.
  4. The IDs in the spreadsheet will match the new names with the preexisting ones.
Thanks,
Tyler Sidell
AdWords Scripts Team

H.W.F. van den Beld

unread,
Sep 22, 2015, 4:54:03 AM9/22/15
to Tyler Sidell (AdWords Scripts Team) via AdWords Scripts Forum
Hi Tyler, 

Thanks for your help. 
This would still be a lot of manually actions.

There should be a smart way to use the final url as adgroup names to group them in excel (because the url is the only unique identifier) and than at #2, #3 or preferable the keyword.

Any experience with this?

Thanks!

Tyler Sidell (AdWords Scripts Team)

unread,
Sep 22, 2015, 11:30:36 AM9/22/15
to AdWords Scripts Forum
Hi,

The best way to group adGroups would be by applying a label.  In your particular use case you can set up a function similar to the one below to apply a label if the ad group name contains "Blue cars":
function main() {
 
var blueCars = AdWordsApp.adGroups().withCondition("Name CONTAINS_IGNORE_CASE 'Group'").get();
 
 
while (blueCars.hasNext()) {
   
var blueCar = blueCars.next();
    blueCar
.applyLabel('Blue cars');
 
}
}

You can even set the label to keywords that have a similar finalURL and modify it to your specific needs.

Thanks,
Tyler Sidell
AdWords Scripts Team

On Tuesday, September 22, 2015 at 4:54:03 AM UTC-4, Q-mark wrote:
Hi Tyler, 

H.W.F. van den Beld

unread,
Sep 23, 2015, 4:06:57 AM9/23/15
to Tyler Sidell (AdWords Scripts Team) via AdWords Scripts Forum
Thanks Tyler for your help and effort.
I will try, but it will still mean a lot of manual search & replace, because not all related groups have the same words in them (eg some just have vehicles instead of blue cars but promote the same product.)
That’s why I’m thinking of using the Final URL in a smart way to use this as the adgroup name and than strip it and after that making them unique by adding #2 #3 etc. By I’m still struggling with that…

Thanks a lot!




Tyler Sidell (AdWords Scripts Team)

unread,
Sep 23, 2015, 9:41:07 AM9/23/15
to AdWords Scripts Forum
Hi,

You could modify the script that I provided by changing the withCondition and changing the selector to search for keywords that contain the same Final URL structure but I would still suggest labels as the way to go.

Example:
function main() {
var blueCars = AdWordsApp.keywords()
   
.withCondition("FinalUrls = 'example'")
   
.withCondition("AdGroupName CONTAINS_IGNORE_CASE 'blue cars'")

   
.get();

while (blueCars.hasNext()) {
   
var blueCar = blueCars.next();
   blueCar
.applyLabel('Blue cars');
   
}
}

Thanks,
Tyler Sidell
AdWords Scripts Team

H.W.F. van den Beld

unread,
Sep 24, 2015, 3:28:31 AM9/24/15
to Tyler Sidell (AdWords Scripts Team) via AdWords Scripts Forum
I will try. Thanks a lot for your help!
Reply all
Reply to author
Forward
0 new messages