Atomic Media text

Atomic Media

Microsoft will only show ads from verified advertisers starting Aug. 1

Written on June 6, 2023 at 9:44 pm, by admin

Microsoft Advertising will only show ads from verified advertisers, starting Aug. 1, the company announced.

Why we care. If you haven’t completed the Microsoft Ads verification requirements, you’ll need to do so before Aug. 1 to avoid any ad delivery interruptions.

Timeline. The Microsoft Ads Advertiser Identity Verification program was announced in June 2022. Key upcoming dates to know:

What users will see. All ads will show:

Here’s what it looks like:

New Ad Library. Microsoft Advertising also announced it is launching a new Ad Library:

Identity verification help. You can read the official help documentation here.

The post Microsoft will only show ads from verified advertisers starting Aug. 1 appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




How to use Google entities and GPT-4 to create article outlines

Written on June 6, 2023 at 9:44 pm, by admin

In this article, you’ll learn how to use some scraping and Google’s Knowledge Graph to do automated prompt engineering that generates an outline and summary for an article that, if well written, will contain many key ingredients to rank well.

At the root of things, we’re telling GPT-4 to produce an article outline based on a keyword and the top entities they have found on a well-ranking page of your choice. 

The entities are ordered by their salience score.

“Why salience score?” you might ask. 

Google describes salience in their API docs as:

“The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.”

Seems a pretty good metric to use to influence which entities should exist in a piece of content you might want to write, doesn’t it?

Getting started

There are two ways you can go about this:

I’m partial to the first, but I’ve also jumped to a Colab or two in my day. ????

Assuming you’re still here and want to get this set up on your own machine but don’t yet have Python installed or an IDE (Integrated Development Environment), I will direct you first to a quick read on setting your machine up to use Jupyter Notebook. It shouldn’t take more than about 5 minutes.

Now, it’s time to get going!

Using Google entities and GPT-4 to create article outlines

To make this easy to follow along, I’m going to format the directions as follows:

Step 1: Tell me what you want

Before we dive into creating the outlines, we need to define what we want. 

query = input ("What do you want to rank for :")
print(query)
url = input("What URL should I be inspired by : ")
print(url)

When run, this block will prompt the user (probably you) to enter the query you’d like the article to rank for/be about, as well as give you a place to put in the URL of an article you’d like your piece to be inspired by. 

I’d suggest an article that ranks well, is in a format that will work for your site, and that you think is well-deserving of the rankings by the article’s value alone and not just the strength of the site.

When run, it will look like:

Defining your target term and inspiration

Step 2: Installing the required libraries

Next, we must install all the libraries we will use to make the magic happen.

!pip install google-cloud-language beautifulsoup4 openai
!pip install wandb --upgrade
!pip install --force-reinstall -Iv protobuf==3.20.00

import requests
import json
from bs4 import BeautifulSoup
from google.cloud import language_v1
from google.oauth2 import service_account
import os
import openai
import pandas as pd
import wandb

We’re installing the following libraries:

When run, it looks like this:

Installing the required libraries

Get the daily newsletter search marketers rely on.

<input type=”hidden” name=”utmMedium” value=”“>
<input type=”hidden” name=”utmCampaign” value=”“>
<input type=”hidden” name=”utmSource” value=”“>
<input type=”hidden” name=”utmContent” value=”“>
<input type=”hidden” name=”pageLink” value=”“>
<input type=”hidden” name=”ipAddress” value=”“>

Processing…Please wait.

See terms.


Step 3: Authentication

I’m going to have to sidetrack us for a moment to head off and get our authentication in place. We will need an OpenAI API key and Google Knowledge Graph Search credentials.

This will only take a few minutes.

Getting your OpenAI API

At present, you likely need to join the waitlist. I’m lucky to have access to the API early, and so I am writing this to help you get set up as soon as you get it.

The signup images are from GPT-3 and will be updated for GPT-4 once the flow is available to all.

Before you can use GPT-4, you’ll need an API key to access it.

To get one, simply head over to OpenAI’s product page, and click Get started.

OpenAI product page

Choose your signup method (I chose Google) and run through the verification process. You’ll need access to a phone that can receive texts for this step.

Once that’s complete, you’ll create an API key. This is so OpenAI can connect your scripts to your account.

They must know who’s doing what and determine if and how much they should charge you for what you’re doing.

OpenAI pricing

Upon signing up, you get a $5 credit which will get you surprisingly far if you’re just experimenting.

As of this writing, the pricing past that is:

OpenAI pricing

Creating your OpenAI key

To create your key, click on your profile in the top right and choose View API keys.

Creating your OpenAI key

…and then you’ll create your key.

Creating your OpenAI key

Once you close the lightbox, you can’t view your key and will have to recreate it, so for this project, simply copy it to a Notepad doc to use shortly.

Note: Don’t save your key (a Notepad doc on your desktop is not highly secure). Once you’ve used it momentarily, close the Notepad doc without saving it.

Getting your Google Cloud authentication

First, you’ll need to log in to your Google account. (You’re on an SEO site, so I assume you have one. ????)

Once you’ve done that, you can review the Knowledge Graph API info if you feel so inclined or jump right to the API Console and get going.

Once you’re at the console:

Getting your Google Cloud authentication

Name it something like “Dave’s Awesome Articles.” You know… easy to remember.

Next, you’ll enable the API by clicking Enable APIs and services.

Google Cloud - Enable APIs and services

Find the Knowledge Graph Search API, and enable it.

Google Cloud Knowledge Graph Search API

You’ll then be taken back to the main API page, where you can create credentials:

Google Cloud Knowledge Graph Search API page

And we’ll be creating a service account.

Google Cloud Knowledge Graph Search - manage service account

Simply create a service account:

Google Cloud Knowledge Graph Search - service accountcreation

Fill in the required information:

Google Cloud Knowledge Graph Search - service account details

(You’ll need to give it a name and grant it owner privileges.)

Now we have our service account. All that’s left is to create our key. 

Click the three dots under Actions and click Manage keys.

Google Cloud Knowledge Graph Search - Manage keys

Click Add key then Create new key:

Google Cloud Knowledge Graph Search - Create new keys

The key type will be JSON.

Immediately, you’ll see it download to your default download location.

This key will give access to your APIs, so keep it safe, just like your OpenAI API.

Alright… and we’re back. Ready to continue with our script?

Now that we have them, we need to define our API key and path to the downloaded file. The code to do this is:

os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/PATH-TO-FILE/FILENAME.JSON'
%env OPENAI_API_KEY=YOUR_OPENAI_API_KEY
openai.api_key = os.environ.get("OPENAI_API_KEY")

You will replace YOUR_OPENAI_API_KEY with your own key.

You will also replace /PATH-TO-FILE/FILENAME.JSON with the path to the service account key you just downloaded, including the file name.

Run the cell and you’re ready to move on.

Step 4: Create the functions

Next, we’ll create the functions to:

#The function to scrape the web page
def scrape_url(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.content, "html.parser")
    paragraphs = soup.find_all("p")
    text = " ".join([p.get_text() for p in paragraphs])
    return text
#The function to pull and analyze the entities on the page using Google's Knowledge Graph API
def analyze_content(content):
    client = language_v1.LanguageServiceClient()
    response = client.analyze_entities(
        request={"document": language_v1.Document(content=content, type_=language_v1.Document.Type.PLAIN_TEXT), "encoding_type": language_v1.EncodingType.UTF8}
    )
    top_entities = sorted(response.entities, key=lambda x: x.salience, reverse=True)[:10]
    for entity in top_entities:
        print(entity.name)
    return top_entities
#The function to generate the content
def generate_article(content):
    openai.api_key = os.environ["OPENAI_API_KEY"]
    response = openai.ChatCompletion.create(
        messages = [{"role": "system", "content": "You are a highly skilled writer, and you want to produce articles that will appeal to users and rank well."},
                  {"role": "user", "content": content}],
        model="gpt-4",
        max_tokens=1500, #The maximum with GPT-3 is 4096 including the prompt
        n=1, #How many results to produce per prompt
        #best_of=1 #When n>1 completions can be run server-side and the "best" used
        stop=None,
        temperature=0.8 #A number between 0 and 2, where higher numbers add randomness
)
    return response.choices[0].message.content.strip()

This is pretty much exactly what the comments describe. We’re creating three functions for the purposes outlined above.

Keen eyes will notice:

messages = [{"role": "system", "content": "You are a highly skilled writer, and you want to produce articles that will appeal to users and rank well."},

You can edit the content (You are a highly skilled writer, and you want to produce articles that will appeal to users and rank well.) and describe the role you want ChatGPT to take. You can also add tone (e.g., “You are a friendly writer …”).

Step 5: Scrape the URL and print the entities

Now we’re getting our hands dirty. It’s time to:

Basically, you want to see anything at this stage. If you see nothing, check a different site.

content = scrape_url(url)
entities = analyze_content(content)

You can see that line one calls the function that scrapes the URL we first entered. The second line analyzes the content to extract the entities and key metrics. 

Part of the analyze_content function also prints a list of the entities found for quick reference and verification.

Step 6: Analyze the entities

When I first started playing around with the script, I started with 20 entities and quickly discovered that’s usually too many. But is the default (10) right?

To find out, we’ll write the data to W&B Tables for easy assessment. It’ll keep the data indefinitely for future evaluation. 

First, you’ll need to take about 30 seconds to sign up. (Don’t worry, it’s free for this type of thing!) You can do so at https://wandb.ai/site.

Once you’ve done that, the code to do this is:

run = wandb.init(project="Article Summary With Entities")
columns=["Name", "Salience"]
ent_table = wandb.Table(columns=columns)

for entity in entities:
    ent_table.add_data(entity.name, entity.salience)

run.log({"Entity Table": ent_table})
wandb.finish()

When run, the output looks like this:

Write the entity metrics to W&B for analysis

And when you click the link to view your run, you’ll find:

Entity table

You can see a drop in salience score. Remember that this score calculates how important that term is to the page, not the query.

When reviewing this data, you can choose to adjust the number of entities based on salience, or just when you see irrelevant terms pop up.

To adjust the number of entities, you’d head to the functions cell and edit:

Entity table

You’ll then need to run the cell again and the one you ran to scrape and analyze the content to use the new entity count.

Step 7: Generate the article outline

The moment you’ve all been waiting for, it’s time to generate the article outline.

This is done in two parts. First, we need to generate the prompt by adding the cell:

entity_names = [entity.name for entity in entities]
gpt_prompt = f"Create an outline for an article about {query} that includes the following entities: {', '.join(entity_names)}."
print(gpt_prompt)

This essentially creates a prompt to generate an article:

Generate an article outline prompt

And then, all that’s left is to generate the article outline using the following:

generated_article = generate_article(gpt_prompt)
print(generated_article)

Which will produce something like:

Generate the article outline

And if you’d also like to get a summary written up, you can add:

gpt_prompt2 = f"Write an article summary about {query} for an article with an outline of: {generated_article}."
generated_article = generate_article(gpt_prompt2)
print(generated_article)

Which will produce something like:

Generate the article summary

The post How to use Google entities and GPT-4 to create article outlines appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




Google fixes issue that took down Ads for about 2 hours

Written on June 6, 2023 at 9:44 pm, by admin

Google Ads advertisers were unable to access Google Ads for nearly two hours today, starting around 9:10 am ET. (This issue has now been fixed and our story updated, see our Postscripts.)

The issue Advertisers who were trying to log in to manage their accounts saw a 500 server status error.

That’s an error. A flurry of complaints on Twitter are collected here. Here’s a screenshot of the error advertisers saw when trying to access their accounts:

ETA. Frustratingly, the Google Ads status dashboard showed no issues during the outage. So advertisers never got an estimated time for a fix from Google.

Why we care. If you are worried, just know, you are not alone. Everyone cannot access the Google Ads system. Try back in an hour or so and hopefully access will be restored.

Postscript. Ginny Marvin, Google’s Ad Liasion, tweeted about the issue at 10:15 am ET:

We're investigating reports of an issue with Google Ads. We will provide more information shortly. The affected users are unable to access Google Ads. Please see the dashboard for updates: https://t.co/EnkDDMtimZ

— AdsLiaison (@adsliaison) June 6, 2023

There also appear to be issues with Google Merchant Center, according to Google, probably related to this.

Postscript 2. Update at 10:50am ET: Google seems to have fixed the issue, I am now able to log in.

Postscript 3. At 12:20 p.m. ET, The following was posted on the Google Ads Status Dashboard:

The post Google fixes issue that took down Ads for about 2 hours appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




Twitter’s U.S. ad revenue drops 59%

Written on June 5, 2023 at 6:43 pm, by admin

Linda Yaccarino today became Twitter CEO – and she’s got some hard work ahead of her. That’s because Twitter’s advertising revenue has declined 59% year on year, according to an internal presentation acquired by The New York Times.

Despite Elon Musk’s recent optimism about Twitter’s advertising progress, stating that “almost all advertisers have returned” and predicting profitability for the platform, the situation remains uncertain.

Something doesn’t add up. During the five weeks from April 1 to the first week of May, Twitter’s U.S. advertising revenue was $88 million. Twitter frequently fell short of its weekly sales forecasts, sometimes by as much as 30%, The Times reported.

Why advertisers are fleeing. A surge in hate speech and explicit content, along with an increase in advertisements for online gambling and marijuana products, caused concern

Twitter’s U.S. ad revenue is projected to drop by at least 56% each week compared to the previous year, according to the internal document.

Twitter’s advertising sector is crucial to its success and value, accounting for 90% of its revenue.

When he acquired Twitter for $44 billion in October and privatized the company, Musk pledged to create “the most respected ad platform.” However, he soon strained relationships with advertisers by terminating key sales executives, promoting a conspiracy theory on the platform and reinstating previously banned Twitter users.

How brands reacted. Several major ad agencies and brands, including General Motors and Volkswagen, suspended their Twitter ad investments. Musk had projected that Twitter’s revenue for 2023 will reach $3 billion, a reduction from $5.1 billion in 2021 when Twitter was a publicly-traded company.

Several of Twitter’s major advertisers, such as Apple, Amazon, and Disney, have reportedly reduced their spending on the platform compared to the previous year, according to three former and current Twitter employees. They also noted that high-value banner ads on Twitter’s trends page, typically purchased by large brands for promotional purposes, are frequently remaining unsold.

Twitter has faced public relations issues with major advertisers, including Disney. In April, Twitter mistakenly gave a gold checkmark, indicating a paying advertiser, to an unaffiliated account called @DisneyJuniorUK. The account then posted offensive content, causing Disney to demand an explanation and assurances from Twitter to prevent such errors in the future.

Why we care. Despite its challenges, Twitter is still a powerful platform that reaches a vast, global audience. The platform still has a user base of millions who engage daily, offering unique opportunities for brand visibility and interaction. 

Changes are starting. Yaccarino, the NBCUniversal executive recently appointed as Twitter’s CEO by Musk, is inheriting several challenges. She has taken over as CEO today – weeks earlier than expected, BBC reported.

Damage done? The new leadership under Yaccarino could signal upcoming changes in their approach to problematic content, potentially improving the advertising environment. Twitter has also added Joe Benarroch, formerly NBCUniversal’s senior vice president of communications, advertising and partnerships.

Advertisers should watch Twitter’s changes, as it may continue to be a potential key player in digital marketing strategies.

The post Twitter’s U.S. ad revenue drops 59% appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




Netflix tops list of YouTube’s top 10 most popular video ads

Written on June 5, 2023 at 6:43 pm, by admin

With 39 million views, Netflix’s “Wednesday” earned the top spot on YouTube’s Cannes Ads Leaderboard 2023, a roundup of the top global video ads since last year’s festival.

Leading video ads trends. Music (Telecom Egypt, Qatar Airways, Orange Egypt, Burger King), authenticity (Peacock, Netflix, HBO Max/The Last of Us), cross-generational appeal (Bulgari, Peacock) and emotion (HBO Max, Bulgari and Qatar Airways) were the hooks that elevated the most popular video ads to earn more than 214 million video views, according to YouTube.

Why we care. YouTube is the most popular U.S. streaming service on TV screens, with an estimated 150 million unique viewers. It is also a profitable platform for creators. Video ads continue to be a great way to drive views by telling stories that connect with your target audience.

YouTube’s top 10 most popular global video ads

These were the top 10 most popular video ads globally from June 2022 to May 2023, along with how many views they have as of publishing.

10. Burger King: Whopper Whopper (Extended)

9.3 million views

9. Peacock: Kevin Hart can’t stop attacking ‘old’ celebrities #shorts

9.1 million views

8. Bulgari: Unexpected Wonders – a movie by Paolo Sorrentino

9.3 million views

7. Orange Egypt: World Cup 2022 campaign – Crazy about Football

19 million views.

6. Galaxy S23 Ultra: Official Introduction Film

23 million views

5. Qatar Airways: C.H.A.M.P.I.O.N.S – official FIFA World Cup song featuring DJ Rodge and Cheb Khaled

23 million views

4. Max: The Last of Us

24 million views

3. Apple: Introducing iPhone 14 Pro

26 million views

2. Telecom Egypt: WE Summer Campaign 2022 – Akram Hosny

33 million views

1. Netflix: Wednesday Releases Thing In New York

39 million views

Dig deeper. YouTube year in review: The top 10 ads of 2022

The post Netflix tops list of YouTube’s top 10 most popular video ads appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




SMX Advanced is online next week… don’t miss out!

Written on June 5, 2023 at 6:43 pm, by admin

The clock is ticking for search marketers: July 1st marks the long-anticipated (read: dreaded?) forced switch to GA4, the 2023 Google Marketing Livestream has come and gone (what are the implications?), and generative AI is taking the world by storm (now is the time to pounce!).

Join thousands of search marketers online next week for SMX Advanced — June 13 and 14 — to learn expert-level, actionable tactics that will help you take advantage of the latest trends in search marketing and stay a cut above the competition.

Your FREE All Access pass unlocks two exclusive keynotes with Microsoft and Google, plus nearly 60 tactic-rich sessions, Overtimes live Q&As, engaging demos, and invigorating Coffee Talk meetups – all exploring the latest search marketing issues, from leveraging generative AI to bolster PPC productivity to confidently configuring GA4 for your business needs. See the complete agenda!

You’ll jumpstart your SMX experience with a straight-from-the-source keynote featuring Cathy Edwards, VP of Google Search, and Michael Schechter, Vice President of Bing Growth and Distribution at Microsoft. Together with Search Engine Land’s own Barry Schwartz, they will discuss how Google and Bing are incorporating generative and conversational AI into their search engines and what it means for SEOs.

Bonus: Join Barry Schwartz and Greg Sterling on Day 2 for a just-announced live demo of the new Bing and Google Search Generative Experience! Bring your queries to this highly-engaging demo, and Barry and Greg will input them live.

Day 2 will kick off with another conversational AI keynote featuring Kya Sainbury-Carter, Corporate Vice President at Microsoft Advertising. Kya and Search Engine Land contributor Greg Finn will explore the impact of conversational search on PPC and how you can adapt your PPC strategies to remain competitive.

After two days of intense training, you’ll be ready to…

… and much more. Don’t miss your final chance in 2023 to attend the only search marketing conference designed by advanced search marketers for advanced search marketers. You and your career deserve this! Secure your free All Access pass now!

Psst… Think you have what it takes to be an “award-winning” search marketer? Enter the 2023 Search Engine Land Awards for your chance to boost team morale, attract new business, and stand apart from the competition!

The post SMX Advanced is online next week… don’t miss out! appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




This Google Ads script uses GPT to summarize account performance

Written on June 5, 2023 at 6:43 pm, by admin

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:

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:

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:

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.

<input type=”hidden” name=”utmMedium” value=”“>
<input type=”hidden” name=”utmCampaign” value=”“>
<input type=”hidden” name=”utmSource” value=”“>
<input type=”hidden” name=”utmContent” value=”“>
<input type=”hidden” name=”pageLink” value=”“>
<input type=”hidden” name=”ipAddress” value=”“>

Processing…Please wait.

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 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 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 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:

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:

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

Google 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:

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.

The post This Google Ads script uses GPT to summarize account performance appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




Ask Instacart brings generative AI to Instacart’s search experience

Written on June 3, 2023 at 12:42 pm, by admin

Instacart is adding generative AI to its search experience. Called Ask Instacart, the new search feature is designed to help answer shoppers’ grocery-related questions and give a boost to sponsored product campaigns.

How it works. Just like with Google and Microsoft Bing, Instacart users will be able to search via natural language queries and get personalized recommendations. For example:

Ask Instacart is built using OpenAI’s ChatGPT plus Instacart’s own AI models. Instacart said this is “a highly specialized model designed to only respond to relevant food-related questions.”

What it looks like. Here’s a screenshot of Ask Instacart:

Ask Instacart

Search prompts. Instacart has also added “personalized question prompts” to the search bar. Instacart said these prompts “anticipate customer preferences, remind them of their needs based on their shopping history, and inspire them to discover new products.”

Why we care. For CPG brands and retailers, this AI-powered search offers a new way to potentially get your product campaign seen by more shoppers – aiding in discovery and driving more sales.

Rollout timeline. More than half of Instacart app users now have access to generative AI search. It will roll out to all U.S. customers “over the coming weeks.”

Intro video. Here’s the video introducing Ask Instacart:

The post Ask Instacart brings generative AI to Instacart’s search experience appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




Bing Chat increases chat turns, adds visuals to travel queries and expands Bing Image Creator

Written on June 3, 2023 at 12:42 pm, by admin

Microsoft Bing has released a number of improvements to Bing Chat this week, including more chat turns, more visuals and expanding Bing Image Creator.

More chat turns. Bing Chat now supports 30 chat turns per conversation, which is up from 20 chat turns per conversation. Plus, you are now allowed 300 total chat turns per day. Bing explained, “This increase also applies to any conversations in your chat history.” So you are allowed to return to conversations where you may have previously reached your turn limit and pick up where you left off, without it counting against your turns.

Eventually, these limits will go away but AI tools like these are expensive and server intensive to run, so Microsoft is scaling it up slowly.

Visuals in travel. Bing Chat now will show and generate more visual results for your travel queries. These visuals also contain links directly to Bing Travel results.

Here is what it looks like:

Bing Image Creator expanded. Bing Image Creator now works not just in creative mode, as it launched in within Bing Chat, but now works in all chat modes, including Precise and Balanced modes.

Here is a GIF of that in action:

Why we care. We will continue to keep track of these improvements to Bing Chat, Google Bard, SGE and other AI improvements. The pace of improvements are increasing and a super fast rate.

The post Bing Chat increases chat turns, adds visuals to travel queries and expands Bing Image Creator appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing




YouTube is the most profitable platform for creators, survey shows

Written on June 3, 2023 at 12:42 pm, by admin

Creators earn the most from their brand partnerships on YouTube – more than Instagram and TikTok, according to a new survey.

By the numbers. On YouTube, 6% of creators earned more than $10,001 per month – compared to 3% of Instagram creators and 2% of TikTok creators.

More expensive, but. While it’s more expensive to work with YouTube creators, brands should work with them because the platform has high engagement metrics.

Creators get a 50% engagement rate, on average, which beats all other platforms by far (TikTok and Instagram had a 3% and 2% engagement rate, respectively). Engagement on YouTube was defined as views, likes, comments and shares. Also:

About the survey. It is a combination of internal data from Aspire, an influencer marketing platform, plus a survey of 1,000 “diverse creators, varying in audience size, main platform of choice, industry, and more.” Most of the creators were U.S.-based.

Why we care. Influencers can help your SEO campaigns. And with big investments continuing in influencer marketing, YouTube seems to offer brands the most ROI for working with influencers right now.

Go deeper. If you want to learn more about how much to pay influencers, you can download the survey results for free from Aspire.

Creators frustrated with TikTok. Disappointed about how much they were being paid, creators were leaving TikTok claiming mental health blows and burnout, as we reported last year. Some creators claimed they were being paid between $0.02 – $0.03 per 1,000 video views.

The post YouTube is the most profitable platform for creators, survey shows appeared first on Search Engine Land.

Courtesy of Search Engine Land: News & Info About SEO, PPC, SEM, Search Engines & Search Marketing