universo-virtual.com

buytrendz.net

thisforall.net

benchpressgains.com

qthzb.com

mindhunter9.com

dwjqp1.com

secure-signup.net

ahaayy.com

soxtry.com

tressesindia.com

puresybian.com

krpano-chs.com

cre8workshop.com

hdkino.org

peixun021.com

qz786.com

utahperformingartscenter.org

maw-pr.com

zaaksen.com

ypxsptbfd7.com

worldqrmconference.com

shangyuwh.com

eejssdfsdfdfjsd.com

playminecraftfreeonline.com

trekvietnamtour.com

your-business-articles.com

essaywritingservice10.com

hindusamaaj.com

joggingvideo.com

wandercoups.com

onlinenewsofindia.com

worldgraphic-team.com

bnsrz.com

wormblaster.net

tongchengchuyange0004.com

internetknowing.com

breachurch.com

peachesnginburlesque.com

dataarchitectoo.com

clientfunnelformula.com

30pps.com

cherylroll.com

ks2252.com

webmanicura.com

osostore.com

softsmob.com

sofietsshotel.com

facetorch.com

nylawyerreview.com

apapromotions.com

shareparelli.com

goeaglepointe.com

thegreenmanpubphuket.com

karotorossian.com

publicsensor.com

taiwandefence.com

epcsur.com

odskc.com

inzziln.info

leaiiln.info

cq-oa.com

dqtianshun.com

southstills.com

tvtv98.com

thewellington-hotel.com

bccaipiao.com

colectoresindustrialesgs.com

shenanddcg.com

capriartfilmfestival.com

replicabreitlingsale.com

thaiamarinnewtoncorner.com

gkmcww.com

mbnkbj.com

andrewbrennandesign.com

cod54.com

luobinzhang.com

bartoysdirect.com

taquerialoscompadresdc.com

aaoodln.info

amcckln.info

drvrnln.info

dwabmln.info

fcsjoln.info

hlonxln.info

kcmeiln.info

kplrrln.info

fatcatoons.com

91guoys.com

signupforfreehosting.com

faithfirst.net

zjyc28.com

tongchengjinyeyouyue0004.com

nhuan6.com

oldgardensflowers.com

lightupthefloor.com

bahamamamas-stjohns.com

ly2818.com

905onthebay.com

fonemenu.com

notanothermovie.com

ukrainehighclassescort.com

meincmagazine.com

av-5858.com

yallerdawg.com

donkeythemovie.com

corporatehospitalitygroup.com

boboyy88.com

miteinander-lernen.com

dannayconsulting.com

officialtomsshoesoutletstore.com

forsale-amoxil-amoxicillin.net

generictadalafil-canada.net

guitarlessonseastlondon.com

lesliesrestaurants.com

mattyno9.com

nri-homeloans.com

rtgvisas-qatar.com

salbutamolventolinonline.net

sportsinjuries.info

topsedu.xyz

xmxm7.com

x332.xyz

sportstrainingblog.com

autopartspares.com

readguy.net

soniasegreto.com

bobbygdavis.com

wedsna.com

rgkntk.com

bkkmarketplace.com

zxqcwx.com

breakupprogram.com

boxcardc.com

unblockyoutubeindonesia.com

fabulousbookmark.com

beat-the.com

guatemala-sailfishing-vacations-charters.com

magie-marketing.com

kingstonliteracy.com

guitaraffinity.com

eurelookinggoodapparel.com

howtolosecheekfat.net

marioncma.org

oliviadavismusic.com

shantelcampbellrealestate.com

shopleborn13.com

topindiafree.com

v-visitors.net

qazwsxedcokmijn.com

parabis.net

terriesandelin.com

luxuryhomme.com

studyexpanse.com

ronoom.com

djjky.com

053hh.com

originbluei.com

baucishotel.com

33kkn.com

intrinsiqresearch.com

mariaescort-kiev.com

mymaguk.com

sponsored4u.com

crimsonclass.com

bataillenavale.com

searchtile.com

ze-stribrnych-struh.com

zenithalhype.com

modalpkv.com

bouisset-lafforgue.com

useupload.com

37r.net

autoankauf-muenster.com

bantinbongda.net

bilgius.com

brabustermagazine.com

indigrow.org

miicrosofts.net

mysmiletravel.com

selinasims.com

spellcubesapp.com

usa-faction.com

snn01.com

hope-kelley.com

bancodeprofissionais.com

zjccp99.com

liturgycreator.com

weedsmj.com

majorelenco.com

colcollect.com

androidnews-jp.com

hypoallergenicdogsnames.com

dailyupdatez.com

foodphotographyreviews.com

cricutcom-setup.com

chprowebdesign.com

katyrealty-kanepa.com

tasramar.com

bilgipinari.org

four-am.com

indiarepublicday.com

inquick-enbooks.com

iracmpi.com

kakaschoenen.com

lsm99flash.com

nana1255.com

ngen-niagara.com

technwzs.com

virtualonlinecasino1345.com

wallpapertop.net

nova-click.com

abeautifulcrazylife.com

diggmobile.com

denochemexicana.com

eventhalfkg.com

medcon-taiwan.com

life-himawari.com

myriamshomes.com

nightmarevue.com

allstarsru.com

bestofthebuckeyestate.com

bestofthefirststate.com

bestwireless7.com

declarationintermittent.com

findhereall.com

jingyou888.com

lsm99deal.com

lsm99galaxy.com

moozatech.com

nuagh.com

patliyo.com

philomenamagikz.net

rckouba.net

saturnunipessoallda.com

tallahasseefrolics.com

thematurehardcore.net

totalenvironment-inthatquietearth.com

velislavakaymakanova.com

vermontenergetic.com

sizam-design.com

kakakpintar.com

begorgeouslady.com

1800birks4u.com

2wheelstogo.com

6strip4you.com

bigdata-world.net

emailandco.net

gacapal.com

jharpost.com

krishnaastro.com

lsm99credit.com

mascalzonicampani.com

sitemapxml.org

thecityslums.net

topagh.com

flairnetwebdesign.com

bangkaeair.com

beneventocoupon.com

noternet.org

oqtive.com

smilebrightrx.com

decollage-etiquette.com

1millionbestdownloads.com

7658.info

bidbass.com

devlopworldtech.com

digitalmarketingrajkot.com

fluginfo.net

naqlafshk.com

passion-decouverte.com

playsirius.com

spacceleratorintl.com

stikyballs.com

top10way.com

yokidsyogurt.com

zszyhl.com

16firthcrescent.com

abogadolaboralistamd.com

apk2wap.com

aromacremeria.com

banparacard.com

bosmanraws.com

businessproviderblog.com

caltonosa.com

calvaryrevivalchurch.org

chastenedsoulwithabrokenheart.com

cheminotsgardcevennes.com

cooksspot.com

cqxzpt.com

deesywig.com

deltacartoonmaps.com

despixelsetdeshommes.com

duocoracaobrasileiro.com

fareshopbd.com

goodpainspills.com

kobisitecdn.com

makaigoods.com

mgs1454.com

piccadillyresidences.com

radiolaondafresca.com

rubendorf.com

searchengineimprov.com

sellmyhrvahome.com

shugahouseessentials.com

sonihullquad.com

subtractkilos.com

valeriekelmansky.com

vipasdigitalmarketing.com

voolivrerj.com

zeelonggroup.com

1015southrockhill.com

10x10b.com

111-online-casinos.com

191cb.com

3665arpentunitd.com

aitesonics.com

bag-shokunin.com

brightotech.com

communication-digitale-services.com

covoakland.org

dariaprimapack.com

freefortniteaccountss.com

gatebizglobal.com

global1entertainmentnews.com

greatytene.com

hiroshiwakita.com

iktodaypk.com

jahatsakong.com

meadowbrookgolfgroup.com

newsbharati.net

platinumstudiosdesign.com

slotxogamesplay.com

strikestaruk.com

trucosdefortnite.com

ufabetrune.com

weddedtowhitmore.com

12940brycecanyonunitb.com

1311dietrichoaks.com

2monarchtraceunit303.com

601legendhill.com

850elaine.com

adieusolasomade.com

andora-ke.com

bestslotxogames.com

cannagomcallen.com

endlesslyhot.com

iestpjva.com

ouqprint.com

pwmaplefest.com

qtylmr.com

rb88betting.com

buscadogues.com

1007macfm.com

born-wild.com

growthinvests.com

promocode-casino.com

proyectogalgoargentina.com

wbthompson-art.com

whitemountainwheels.com

7thavehvl.com

developmethis.com

funkydogbowties.com

travelodgegrandjunction.com

gao-town.com

globalmarketsuite.com

blogshippo.com

hdbka.com

proboards67.com

outletonline-michaelkors.com

kalkis-research.com

thuthuatit.net

buckcash.com

hollistercanada.com

docterror.com

asadart.com

vmayke.org

erwincomputers.com

dirimart.org

okkii.com

loteriasdecehegin.com

mountanalog.com

healingtaobritain.com

ttxmonitor.com

bamthemes.com

nwordpress.com

11bolabonanza.com

avgo.top

This Google Ads script uses GPT to summarize account performance - SEO
Tuesday, July 15, 2025
spot_img

Top 5 This Week

Related Posts

This Google Ads script uses GPT to summarize account performance

Last month, I shared my first GPT-enabled Google Ads script. It identifies missing RSA headlines and suggests new variants.

This month, I wanted to push the limits of GPT a little harder and see if I could get it to write my next script for me. Spoiler alert: It worked! But it needed some handholding to get there. I’ll teach you how I engineered the prompt to get a successful result.

The script I am sharing uses OpenAI’s GPT to write an account performance summary along with some suggestions for how to improve the performance of a Google Ads account.

Making PPC reports more descriptive

PPC reporting can be a tedious task. By nature, it’s also repetitive because clients and stakeholders expect the latest report in their inbox regularly – be it weekly, monthly, or, heaven forbid, even daily.

There are plenty of great reporting tools (I work for one). While they can automate pulling in the data and visualizing it, making sense of and telling a story with the data usually still require a human’s touch. GPT excels at writing compelling stories, so it seemed like a good solution for my problem.

GPT and generative AI are adept at producing well-written text. Because large language models (LLMs) have read billions of words, they’re very good at predicting how to put words together in a way that makes for a compelling read.

But as compelling as they may be, they’re not always true, and that’s a big problem when the goal is to share trustworthy reports with clients.

So I set out to figure out if I could force GPT to be correct and a great storyteller about the data in an ads account.

GPT’s truth problem

A weakness of GPT is that its core strength is predicting the next word in a string. It’s much less reliable when it comes to fact-checking and ensuring what it says is correct.

Its training might have included dozens of blog posts about how to get more conversions in Google Ads.

Because those articles probably frequently mention tasks like checking budgets and managing CPA targets, GPT will likely include those things when it generates advice related to getting more conversions. 

But it may get the details slightly wrong, like whether an advertiser whose CPA is lower than the target CPA should increase or decrease their ad budget. GPT isn’t solving a problem analytically but rather predicting the words to include in its advice.

Another problem is that GPT remains bad at math despite openAI’s work to address this known problem.

For example, if provided with facts like how many clicks and impressions a campaign has, it’s not safe to assume that it will know how to determine the correct CTR from this information. We all know it’s a simple formula: clicks/impressions = CTR.

Sometimes GPT will get it right, but there’s no guarantee.

To avoid calculation errors, I decided it would be safer to do the math myself and provide the results in the prompt.

Rather than trusting GPT to calculate metrics like CTR, conversion rate, etc., correctly, I provided the values for those metrics in the prompt.

How to provide GPT with facts about your business

The specific task I wanted to automate was describing how an account’s performance changed last month compared to the month before and including some optimization suggestions.

When creating this automation, I couldn’t jump straight into the code. I had to manually create a process that worked before turning that process into an automation.

The first step was to experiment with GPT to determine what data it needed so it would stop making up facts and instead rely on the truth for crafting its stories. This required giving it Google Ads data with the facts I wanted it to describe. 

Fortunately, GPT can take a table as input and figure out how to interpret the various cells. So I created a table of campaign performance and exported it as a CSV text file which could be copied and pasted into a GPT prompt. 

Because I wanted GPT to comment on the changes in performance between two date ranges, I initially brought in two separate CSV strings, one for each period.

But two separate CSV strings use more tokens than the same data combined into a single CSV with separate columns for different date ranges.

So to make the automation slightly better at working with bigger accounts, I generated the combined CSV string.

With factual data ready to insert into a prompt, I could then move on to engineer the prompt to give me the best results possible.

Prompt engineering

With factual data to work with, I next needed to tell GPT what to do with those facts. The prompt could be as simple as:

  • “Write a summary of the campaigns’ performance comparing the two periods.”

GPT is smart and figures out what the different periods in the CSV data are.

If it tends to focus too much on certain metrics you’d like to deprioritize, add more detail to the prompt, like:

  • “Do not include Search Lost IS in the summary.”

Next, I wanted it to include some optimization tips. To make the suggestions more reliable and more in line with my own management style, I loaded the prompt with some additional facts like these:

  • The target CPA is $20. A cost higher is bad, and a cost lower is good.
  • If the Search lost IS (budget) > 10% and the CPA is below the target, the budget should be raised.
  • if the CPA is above the target, the bids should be adjusted.

Then when sending a very detailed prompt with CSV data, facts, and a request for what to do with this data, GPT started giving solid answers.

With all the puzzle pieces in place, it was time to ask GPT to write me the automation.

Get the daily newsletter search marketers rely on.


See terms.


Getting GPT to write Ads scripts

The code for a Google Ads script to pull data from an account isn’t particularly complicated. It’s part of almost any script and very well documented.

So I crossed my fingers and asked GPT to write a script to pull the data for me with this prompt:

GPT promptGPT prompt

The response looked like a good script, but one thing seemed a bit off. It was writing a GAQL query that included the two date ranges I wanted to compare in a single query. That is not supposed to work.

Incorrect outputIncorrect output

So I asked GPT to try again, and while the implementation changed slightly, it once again messed up the date ranges in the GAQL query:

Incorrect outputIncorrect output

At this point, I could have given up and fixed the code myself, but instead, I did some prompt engineering.

What if my prompt was confusing GPT?

I told it to:

  • “Get the clicks, impressions, cost, CTR, average CPC, conversions, conversion rate, and cost per conversion metrics for the previous month and the month before that.

Could I be clearer and tell it this should be done in two separate queries that would be merged later?

So I changed the prompt to include this new text:

  • “Get the clicks, impressions, cost, CTR, average CPC, conversions, conversion rate, and cost per conversion metrics. Get the report for 2 date ranges: last month and the month before that. build a map where the key is the campaign name and it includes the stats from the 2 date ranges.

This is much more precise, and the result came back as follows:

Google Ads scriptGoogle Ads script

Now GPT was writing the correct code. After installing it in my Google Ads account, it immediately worked as expected and generated the needed CSV data.

This was a good lesson in prompt engineering for me. If you hire a new team member who’s never done PPC, you probably need to be pretty precise in your instructions when you ask for help. It’s the same with GPT, precision matters!

Also, it still matters to be a subject matter expert. Someone who’s never worked with GAQL or API reports from Google Ads might not know that you can’t get data for two date ranges in a single call. Without that knowledge, finding the error in the GPT response could be very difficult.

Bottom line, when asking GPT to generate code, it’s helpful to write pseudo-code rather than being too general and only telling it what outputs you expect. The more you tell the system how to arrive at that output, the more likely it will write code that works. 

With the code to pull CSV data working, I now needed some code to send that data to GPT to ask for a summary.

Using GPT in Google Ads scripts

To use GPT in a script, you need API access and an API token. You can sign up for this on the OpenAI website. With that, you can write a simple function that calls the API with a prompt, gets the response, and prints it on the screen.

This code could be requested from GPT, but I already had it from last month’s RSA script so I just reused that.

Here’s the code snippet to use GPT in Google Ads scripts

Putting it together

Next, I put the two scripts above together. The first script gets the data I need for my prompt, and the second script sends that data as a prompt to GPT and captures the response, which is then rendered on screen.

Grab a copy of the complete code here and remember to add your own API key to start using it:

Then you should experiment with the facts and prompt. The line in the code where you enter facts should include details you want GPT to know, such as:

  • What your target is.
  • Whether a number higher or lower than the target is good or bad.
  • Facts about your account optimization methodology (i.e., what you would recommend doing if the CPA is too high and the impressions have decreased).

GPT will pull from the facts you provided rather than making stuff up when it summarizes the performance.

You can also engineer the prompt to do things the way you want.

For example, you could ask GPT to include or exclude particular metrics in its summary or tell it what style to write in, e.g., conversational or business-oriented.

Remember that this script uses the OpenAI API, which is not free. So every time you run this, it will cost money.

I recommend running this script as needed and not putting it on an automated schedule.

Summarizing PPC performance with GPT

GPT is excellent at writing but can have problems with factual correctness. That is why providing as many facts as possible in the prompts is helpful.

By using a Google Ads script, facts about account performance can automatically be prepared in a format that works with GPT.

Use this script to provide GPT with facts about your account and get a performance summary that can be shared with clients and stakeholders.

I encourage you to check it out and let me know what you think.


Contributing authors are invited to create content for Search Engine Land and are chosen for their expertise and contribution to the search community. Our contributors work under the oversight of the editorial staff and contributions are checked for quality and relevance to our readers. The opinions they express are their own.


Popular Articles