X
    Categories: Scripts

Free Script For Expanded Text Ads

Expanded Text Ads (ETAs) from Google AdWords are now available for all advertisers to create. To help everyone who’s too busy to write thousands of new ads but who still wants to make the transition quickly we’ve just released a new free AdWords Script.

The script uses your landing pages’ meta tags to make suggestions for the new longer ad components. The title tag gets split into 2 lines of ad headlines and the meta description’s first 80 characters become the basis of the ad description line.

The script outputs a Google Sheet that can be imported into the AdWords Editor after you make any final tweaks to your ETAs.

You can read more about it on Search Engine Land.

The AdWords Script

Copy the code into your own AdWords account and give it a try:

Step-by-step for Using AdWords Scripts

If you’ve not worked with AdWords Scripts yet, this is a great way to get your feet wet. The script simply outputs a spreadsheet of data and makes no changes to your account so it’s a very low-risk way to try things out. Here is a quick step-by-step:

  • Copy the script code from the section above
  • Copy-and-paste it into the Bulk Operations > Scripts section of your AdWords account
    • put it into a child account and not in an MCC account
    • the code should completely replace any other code already in the script

  • Edit the text between lines 23 and 29 to customize the script
  • Authorize, Save, and finally Preview the script
  • Switch to the “Logs” view of the output and make sure the script ran successfully

  • Open the just-created Google Sheet and make final tweaks to the bulk sheet of expanded text ads

  • Go to the AdWords Editor and go to the menu for “Account” > “Import” and either import the data from a file or by copy-and-pasting

  • Do a final review of changes and apply the changes to your account.
  • Congrats! You just used AdWords Scripts to save yourself a ton of time…

Try Some Other AdWords Scripts

We have lots of other scripts to try and they’re all on our patent pending Enhanced Scripts™ platform so that the code will work equally well on MCC and child accounts, you can maintain multiple settings per account, easily maintain different settings different accounts, and most importantly, all without ever touching a single line of code. If you can copy-and-paste, you can use our Enhanced Scripts™ for AdWords.

Frederick Vallaeys: Frederick Vallaeys was one of the first 500 employees at Google where he helped grow the AdWords search marketing system and served as Google’s AdWords Evangelist, teaching advertisers about which Google products are best to support their marketing goals. He was a key player on several of the teams that made AdWords into the leading platform for search marketing, including the team that started the AdWords Editor and the one that acquired Urchin (now Google Analytics). He has contributed his technical expertise to several AdWords books including bestsellers like “AdWords for Dummies,” “Advanced Google AdWords,” and “Quality Score in High Definition” and he writes a monthly blog for searchengineland.com. He helps advertisers improve their search marketing results through Optmyzr.com, an AdWords tool company that makes a Historical Quality Score Tracker, One-Click AdWords Optimizations and other tools to make account management more efficient.

View Comments

  • Looks like a great script. Unfortunately I am getting this error when trying to run it -

    TypeError: Cannot read property "1" from null. (line 237)

    Has anyone got any ideas on how to fix? It looks like it happens when trying to pull information from the first landing page.

    Thanks

    • Thanks for the feedback. I have added code to deal with meta tags that use different capitalization, e.g. , , or . Let us know if it still breaks....

      • I am getting the same error as well "TypeError: cannot read property "1" from null. (line 243)

        Line 243 is:
        var title = scrap[1];

        • What is your landing page URL please? The script is not able to find a title tag so I'd like to take a look at how your html is set up.

  • I just ran the script and the output looks good.

    Not just for converting to the new expanded ads- but also for creating new ads(expanded) for a new client- like an e-commerce company with lots of products...
    The script is taking out the copy from the website meta title and description tags-putting the clients copy into the draft ad versions of Google sheet/CSV that can be imported as is - after any amendments.
    Having the same spacing for titles and descriptions as the website meta tags and expanded ad copy- this is certainly very practical.

  • This looks like a really useful script Frederick, thanks for sharing. I'm seeing an error in preview though: ReferenceError: "checkUrls" is not defined. (line 133)

    i thought i'd followed the instructions, did I miss something? Thanks

  • I tried this script but I get this error ..
    ReferenceError: "checkUrls" is not defined. (line 133)

  • I tried running the script and i get this Error...

    new url found: ["http://www.example.com"]
    checking ["http://www.example.com"]
    Exception: Invalid argument: ["http://www.example.com"]

    • Frederick,

      Thanks fort the script.

      Also running into the issue that Matthew Chan is having with the "invalid argument"

      "Exception: Invalid argument:"

      Any suggestion of a path to follow to troubleshoot? The URL's in question all resolve properly when manually tested.

  • hi, great script but maybe you know why there is almost everything udefined in a sheet? (meta title, meta desc, first H1 (or h1, ive tried both) - undefined , just final URL, campaign and adgroup with content)

  • Hi, could you please help? I am getting this error:
    Not authorized
    This script is currently not authorized to run in your account.
    Please start the authorization process again.

  • Not sure where I went wrong. I did edit the top section but received this error

    The coordinates or dimensions of the range are invalid. (line 175)

    Line 175 is
    metaSheet.getRange(2, 6, numRows, 1).setFormulaR1C1("=LEN(R[0]C[-1])");