NEW: Tailor Ads by Device or Audience with AdWords IF Functions


Expanded Text Ads have been the only text ad format available to advertisers for about a week now, and Google is already rolling out innovation in the form of IF functions.

“Hold your horses, Allen: what’s an ‘IF’ function?”

Frankly, an ad customizer on steroids.

adwords IF function in action

According to Google, “IF functions allow you to insert a specific message in your text ads when a condition is met, and a default text when it does not.” This gives you the ability to tailor your ad copy based on either device or audience, ensuring a hyper-relevant message is served to your prospects.

Say, for example, you’re a savvy online retailer who uses remarketing to great effect; you know that cart abandoners—people who come to your site, fill a cart, and leave before completing their purchase— are an incredibly valuable audience. This week, in honor of the incredible Patriots’ Super Bowl win, you decide to offer 10% off of everything on your site, and you advertise accordingly in your AdWords account.

By using IF functions, you can ensure that cart abandoners, people mere clicks from making a purchase, see a “limited,” “exclusive,” or otherwise irresistible offer of 15% off plus free shipping. The uninitiated (everyone else) will see your standard 10%-off sale, but these incredibly valuable prospects will be faced with an offer they simply can’t say no to.

If you depend on lead generation instead of eCommerce, IF functions have the potential to be just as valuable. Odds are, your prospects behave differently on mobile than desktop (by and large, people are less stoked on form fills when they’re forced to complete them using thumbs and a touch screen. Shocking, I know). But by changing your messaging to reflect an easier, mobile-specific CTA, you may be able to squeeze leads out of previously low-performing mobile audiences.

Interested in taking IF functions for a spin? Thought so.

How do AdWords IF Functions work?

If you’ve ever tried to use ad customizers, you’re familiar with the guiding principles behind IF functions. Basically, by inserting a parameter into your ad, it becomes mutable, capable of altering copy to reflect the conditions outlined within the aforementioned parameter.

IF functions are inherently easier to work with than other ad customizers because they don’t rely on pesky feeds; instead, they rely solely on the conditions you create within the braces. If something breaks or goes wrong, the ad will simply revert to the unmodified version, so you needn’t run another ad without an IF function in the same ad group; Google, in their benevolence, has got you covered.

Really, the only thing you need to master in order to use IF functions are IF functions themselves.

Now, I completely understand that braces are daunting. As a rule, I flee from anything that resembles math or code. But these are really simple: as long as you’ve got the right punctuation in place, you’re golden.

A few quick tidbits before digging in:

  • IF Functions can be used anywhere in your ad except for the final URL
  • The only supported dimensions are “audience” and “device”  
  • Currently, the AdWords UI will auto-populate the syntax for device targeting. If you want to use “audience” as the dimension instead, you simply need to rewrite the parameter and insert the name (or names) of the corresponding list exactly as it appears within your account (a list of your existing audiences can be found in the Shared Library > Audiences tab)
  • IF functions are only available on the search network

Device & Audience IF Functions

Google has oh-so-helpfully given us the following table explaining the differences between and offering examples of the two different IF functions:

 adwords if function dimension options

As you can see, the device and audience functions are quite similar looking from a structural standpoint. The biggest (read: only) difference is the inclusion of the “IN” field, which tells AdWords which audience lists you’re referencing.

If you decide to use IF functions, do not forget to include “default text” within your braces. This is the copy that will show to all prospects who don’t satisfy the conditions present within your IF function; this means that “default text” is actually “incredibly important” text. Don’t just throw some cookie-cutter copy in there and expect your modified ads to take care of the rest!

Now, let’s take a close look at each type of IF function.

Device-Specific IF functions

 adwords if function device

Pretty straightforward. As you can see in Google’s example, device-specific IF functions are really just a new way of implementing mobile-only ad copy. With Expanded Text Ads, the ability to include mobile-only ads in your account flitted off into the ether. There was a complex workaround that involved leveraging a feed (see #5 on this list of ETA-related sins for a detailed breakdown) but most advertisers struggled to use it or didn’t know it was possible. Here, all you really need to do is specify that the device you’re customizing copy for is “mobile,” write in both the modified and control versions of your ad copy, and voila: you’ve got mobile-specific ETA’s.

Audience-specific IF functions

 adwords if functions audience

Audience-specific IF functions are a bit more complex, but they really only introduce one extra parameter: the audiences themselves. Note that you can add as many audiences as you like, but as of this post being written you may only add one modification to your ad copy. So, for example, you can’t offer one discount to cart abandoners, another to people who gave you email addresses, and a third to prospects who visited your site more than 180 days ago. As such, use the IF function to target the most valuable audiences in your repertoire and serve a slice of equally killer copy to everyone else.

How to Implement IF Functions in Your AdWords Account

Navigate over to the Ads tab within the AdWords UI and press the big, shiny red button.

if function ad creation 

Once the dropdown menu populates, select “Text ad.”

adwords if function ad creation 

Now for the first tricky part: determining where you want to add your IF function. I recommend starting out by placing it in the description line. Once you become an IF function master, experiment with moving the formula into one of the headlines (or even the URL pathways). Anyway, once you’ve decided where to include your IF function, insert a brace (one of these little guys: { ). This will cause another dropdown menu to appear; simply select “IF function” and get ready to write.

 adwords if function text ad creation with brace

For Device

Now, as I touched on before, device IF functions are the easier of the options because the formula automatically appears within the designated section of your ad; all you have to do is complete the requisite parameters which, in this case, means writing your default and modified copy. The formula itself looks like this:

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

For Audience

For audience IF functions, things get a bit trickier. You need to identify which audiences you’d like to serve alternate ad copy to, then list them out, ensuring that the audience names are spelled correctly. If you’d like to add multiple audiences, just be sure to separate them with commas.  From there, follow the same process you used for the device IF functions: write your modified copy, write the default copy, and kick back to watch the leads flow in.  Here’s what the formula looks like:

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

IF functions and A/B Testing

You’ve decided to implement IF functions throughout your account. You’ve mastered the subtle art of writing copy within braces. What now?

Start testing to create even better ETA's.

Make IF function split testing a component of your weekly optimization routine. Experiment with alternate copy in new places (I’ve got a hunch implementing super-compelling offers in the second headline will be a game-changer), and adjust your default text and see if there’s a way to improve upon your device/audience specific offer.

About the Author

Allen Finn is a content marketing specialist and the reigning fantasy football champion at WordStream. He enjoys couth menswear, dank eats, and the dulcet tones of the Wu-Tang Clan. If you know what's good for you, you'll follow him on LinkedIn and Twitter.

Find out how you're REALLY doing in AdWords!

Watch the video below on our Free AdWords Grader:

Visit the AdWords Grader.


Feb 08, 2017

Doesn't seem like the Audience part is working yet, just device...?

Allen Finn
Feb 08, 2017

Hi, Sam.

Thanks for checking out the post. Right now, the AdWords autocomplete when you choose to create an IF function is for device, but you can rewrite the formula (just by copying the one in green above) for audience IF functions with ease!


Alpha monster advanced review
Feb 11, 2017

What's up friends, how is the whole thing, and what you
would like to say concerning this article, in my view its genuinely awesome for me.

Feb 09, 2017

Here i had read the content you had posted. It is much interesting so please keep update like this.

Dez Calton
Feb 09, 2017

Very interesting and informative article.

But I do question the wisdom of Google in removing the ability to tick a box to make a mobile specific ad, to replace this simple technique with having to write code to achieve the same end.

Feb 09, 2017

Excellent post! One question: Since the IF function can't be used in the final URL, if you show a 15% discount to one audience and a 10% discount to another audience, how will your website know whether the person clicked on a 10% or 15% discount message?

Allen Finn
Feb 10, 2017

Hi Josh!

Thanks for the comment. The simplest answer to your question is that, within your IF function, you can include a special code that the customer can enter at checkout (one that differs from and will replace whatever you're using to apply the 10% discount).

Feb 10, 2017


Does anyone else see the function in the AdWords preview? I hope this is not what's is being shown to searchers.

Feb 13, 2017

Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.

قطعات خودرو
Feb 13, 2017

It was a good training
But I did not know exactly in which part of Google's
This for me does not show
I will be grateful for help

Feb 14, 2017

It’s amazing in support of me to have a site, which is useful in support of my know-how. thanks admin|, you surely come with remarkable articles. Cheers for sharing your website page.Excellent blog here...

Aaron Chambers
Feb 24, 2017

Great Post!

Just a quick question,

I'm wanting to use the audience IF function to "Cart Abandoners" without offering a discount.

But how do I differentiate impressions, clicks etc between which ad was shown, as in AdWords it will only show the data as an ad itself not split into the custom and default audience?

Thank you,

Allen Finn
Feb 24, 2017

Hey, Aaron.

Great question, you stumped me!

Just got off the phone with Google and according to them, there's currently no way to differentiate between impressions for the different versions of the ad when you use an IF function defined by audience.

For device-type , you simply need to segment by device within the ads tab.

Good things,

Leave a comment