HomeBlogNEW: Tailor Ads by Device or Audience with Google Ads IF Functions

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

Author: Allen Finn
Last Updated: November 23, 2021 | Paid Search Marketing

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. Check it out.

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 Google Ads (formerly known as 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 Google Ads 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 Google Ads 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 functions for mobile ads

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 Google Ads Account

Navigate over to the Ads tab within the Google Ads 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.

Join 713K other marketers that receive our weekly newsletter!

Meet The Author

Allen Finn

Allen Finn is the co-founder of Toasted Collective, a cannabis-focused digital agency. Many moons ago, he worked at WordStream, where he reigned as fantasy football champion for some time.


Please read our Comment Policy before commenting.

Unlock your business potential

We offer innovative technology and unparalleled expertise to move your business forward.