Search
Clear search
Close search
Google apps
Main menu
true

About IF functions

IF functions allow you to insert a specific message in your text ad when a condition is met, and a default text when it does not. This makes your ads tailored to each search and more relevant to potential customers. Unlike ad customizers, IF functions do not use a feed.

How it works

IF functions only work for ads shown on the Search Network. IF functions are parameters that go within braces {like this}. The parameter gets replaced by the text you specify when your ad is triggered by a person’s search. You can include IF functions anywhere in your text ad except for the final URL field.

Supported targets

 

Target Attribute Code Example

device

mobile

{=IF(device=mobile, text to insert):default text}

{=IF(device=mobile, Quick, Easy, Mobile Booking):Best price guarantee}

audience

 

any valid user list name in your account

{=IF(audience IN(<userlist1>,<userlist2>),text to insert):default text}

{=IF(audience IN(returning visitors, cart abandoners),30%):25%}

If you're targeting by audience, make sure your ads follow the Personalized advertising policy.

Examples

Tailor your message for mobile users.

AdWords Google Search

Headline 1: Kids Basketball Shoes

Headline 2: Save 20% on Top Brands

Description: Get The Best Shoes At The Best Price. {=IF(device=mobile,Free Shipping on Mobile Orders!):Buy Now!}

Mobile

Kids Basketball Shoes - Save 20% On Top Brands
Ad www.example.com
Get The Best Shoes At The Best Price. Free Shipping On Mobile Orders!

Computer

Kids Basketball Shoes - Save 20% On Top Brands
Ad www.example.com
Get The Best Shoes At The Best Price. Buy Now!
 

Give cart abandoners an extra incentive to complete the transaction.

 
AdWords Google Search

Headline 1: Kids Basketball Shoes

Headline 2: Save {=IF(audience IN(Cart Abandoners),30%):20%} on Top Brands

Description: Get The Best Shoes At The Best Price. Free Shipping. Buy Now! 

Audience = cart abandoners

Kids Basketball Shoes - Save 30% On Top Brands
Ad www.example.com
Get The Best Shoes At The Best Price. Buy Now!

Other audiences

Kids Basketball Shoes - Save 20% On Top Brands
Ad www.example.com
Get The Best Shoes At The Best Price. Buy Now!
The character limit for your ads may vary for double-width character languages. Make sure your ads follow the Editorial advertising policy.

Related links

Was this article helpful?
How can we improve it?
Reach more customers with an online ad

With AdWords, you can run ads on Google to stand out on local searches. Only pay when your ad is clicked. [Learn more]

Sign Up for AdWords