🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 29, 2026

How to Personalize Gravity Forms for Each Visitor (Country, UTM, Referrer, Role and Device)

GravityExtra
How to Personalize Gravity Forms for Each Visitor (Country, UTM, Referrer, Role and Device)

Most forms say exactly the same thing to every visitor. The person who clicked your spring newsletter sees the same introduction as someone who found you on a search engine; a visitor from Germany is asked for a field that only matters in the United States; a returning customer is greeted like a stranger; and someone on a phone scrolls past a long billing section they will never need. The Gravity Forms Content Personalization Premium Add-on fixes that with simple rules in the form editor: if a visitor matches some signals, then show, hide or swap parts of the form. This tutorial walks through how it works, step by step, with real examples you can copy.

We will cover the signals you can use, how to write a rule, how priority and the Default fallback decide what each visitor sees, how to carry the result into confirmations, notifications and entries, and what to do when your form lives on a cached page.

Why personalize a form at all?

A form is often the last step between a visitor and a sale, a booking or a lead, and every irrelevant question costs completions. Personalization lets one form serve several audiences without building and maintaining a separate copy for each of them. A few typical wins:

  • Campaign landing forms that greet visitors from a newsletter or an ad with the offer they clicked, using the UTM parameters already in your links.
  • Country-aware forms that hide a field that does not apply in some countries, translate a label, or show a local privacy notice.
  • Member forms that offer different choices to logged-in customers, staff or partners based on their WordPress role.
  • Mobile-friendly forms that drop an optional section on phones so the form stays short.
  • Returning-visitor forms that say “welcome back” and ask a different follow-up question.

All of this happens inside one Gravity Form, so your entries, notifications, feeds and reports stay in one place.

The signals you can use

Each rule is built from conditions, and each condition compares one visitor signal with a value. The add-on reads these signals:

  • Country and region. Two-letter country codes such as US, DE or GB, and region codes such as CA for California. By default these come from the visitor-location header that many hosts and CDNs already add to every request, so no outside lookup is needed. You can also drop a free IP-to-country database file onto your site, or, if you choose, connect an IP lookup service with your own token.
  • Referrer domain. The site the visitor came from, such as google.com or linkedin.com. A domain also matches its subdomains, and your own site counts as no referrer.
  • URL parameters. Any query parameter, including the standard utm_source, utm_medium and utm_campaign tags or your own, such as ref or partner.
  • First visit or returning. A small first-party cookie that holds only the value “1” tells a first visit from a return visit.
  • Logged in and user role. Whether the visitor is signed in, and which WordPress roles they have.
  • Device. Mobile, tablet or desktop.

Every condition uses one of ten operators: is, is not, is one of, is not one of, contains, does not contain, starts with, ends with, is empty and is not empty. Lists are comma-separated, and comparisons ignore upper and lower case, so Newsletter and newsletter are the same value.

Step 1: turn on personalization for a form

Install the add-on, then activate your licence key under Forms → Settings → Personalization. Open the form you want to personalize and go to Settings → Personalization. Tick Personalize this form. Leave the mode on Server for now; we will come back to the other mode when we talk about caching.

The Personalization tab of a Gravity Form, with two rules and the Default fallback in the rule builder

Step 2: write your first rule

Select Add rule and name it “Newsletter readers”. The name matters: it is what you will see later in your entries and what the {personalize:rule} merge tag prints. Under If, choose the signal URL parameter, type utm_source as the parameter name, choose is and enter newsletter.

Under Then, add the actions. For this example, add Swap HTML block on the introduction block and write a short welcome that mentions the offer from the newsletter. Then add Swap label on the “How did you hear about us?” field and change it to “Which newsletter issue brought you here?”. Finally, type a short thank-you in the rule’s text box, for example “Thanks, newsletter reader – your tour link is on its way.” Save the rules.

Now open the page with ?utm_source=newsletter at the end of its address. The introduction and the label change; open it without the parameter and you get the normal form.

Step 3: add rules for other audiences

Add a second rule named “Germany” with the condition Country is DE. Give it two actions: Hide the Company field, and Swap label on the Name field to “Ihr Name”. Because hidden fields are removed on the server, the Company field is not just invisible – it is not in the page at all, and even though it is marked as required, it will never stop a visitor from Germany from submitting.

Add a third rule named “Search visitors” with Referrer domain is google.com. Use Show on a Promo code field, a Swap description that explains the discount, and Swap default value to prefill the code. A field that a rule shows stays hidden for everyone else, so the promo code only ever appears for visitors who came from search.

The difference for two visitors looks like this. First, a visitor with no matching signals:

A Gravity Form as a default visitor sees it, with the Default fallback description and no promo code field

And the same form for a visitor from Germany who arrived from a search engine through a newsletter link:

The same Gravity Form personalized: German label, Company field removed, newsletter welcome and a prefilled promo code

Step 4: combine conditions with AND and OR

Each rule can hold several conditions. Choose all conditions match (AND) when every condition must be true, for example Country is GB AND Device is mobile for UK phone visitors. Choose any condition matches (OR) when one is enough, for example utm_medium is cpc OR utm_medium is ppc for paid-ads traffic. For lists of values you can also use is one of, as in Role is one of editor, author.

Step 5: set priority and a Default

Sooner or later a visitor will match more than one rule. The add-on resolves this with a simple, predictable principle: rules run from top to bottom, and the order is the priority. For each field and each kind of change – visibility, label, description, default value, choices or content – the highest matching rule wins. A lower rule can still change something the higher rule left alone. Move rules up and down with the arrow buttons to change which one wins.

The Default card at the bottom applies only when no rule matches at all. Use it to give everyone else a sensible version of the form, for example a helpful description on the Name field, and a default thank-you text for your confirmation.

Step 6: personalize confirmations and notifications

The add-on adds two merge tags to the merge tag picker. {personalize:text} prints the text of the rule that matched, or the Default text when no rule matched, and {personalize:rule} prints the matched rule’s name. Put {personalize:text} in your confirmation message and every visitor gets the right thank-you: newsletter readers hear about their tour link, visitors from Germany get a German thank-you, and everyone else gets your standard reply. The same merge tags work in notification emails, so your team can see at a glance which audience a submission came from.

The name of the matched rule is also saved with every entry. Add the Personalization rule column to the entries list to see it beside each submission, and filter entries by it to compare audiences.

The Gravity Forms entries list with the Personalization rule column showing the matched rule for each entry

Multi-page forms, AJAX and validation

Personalized forms behave like any other Gravity Form. When a visitor moves to page two of a multi-page form, submits an AJAX form, or sees the form again because a field needs fixing, the add-on still knows the signals of the first view. That matters because, on those later requests, the address bar and the referrer usually point at your own page rather than at the newsletter or search engine the visitor came from. The first-view signals are signed and carried with the form, so they cannot be edited in the browser, and the same rules keep applying from the first page to the confirmation.

Cached pages and the cache-safe browser mode

Page caching is great for speed, but a full-page cache serves the same HTML to every visitor, so it cannot hold a form that was personalized on the server. In Server mode the add-on tells caching plugins that respect the standard “do not cache this page” flag to skip the form page. If your form must stay on a cached page, switch the form to Cache-safe browser mode. The server then sends the same neutral form to everyone, and a small script evaluates the rules in the visitor’s browser and applies them before the form appears, so there is no visible swap. In this mode the browser can use the referrer, URL parameters, first visit or returning and the device. Country, region, login and role are only known on the server, so rules that need them do not match in this mode, and the editor shows a warning on those rules.

Privacy by design

Personalization does not need to mean tracking. The add-on stores only the name of the matched rule with each entry; it never stores the visitor’s country, referrer, parameters or device. The first-visit cookie holds just the value “1” and no identifier, it is set only on pages whose form actually uses a first-visit rule, and you can switch it off or make it wait for consent through the WP Consent API. By default the add-on makes no outside calls at all: the country comes from your host’s own header or a local database file. If you decide to use an IP lookup service, you add your own token, and results are cached under a hashed key so visitor addresses are never stored.

Tips for good rules

  • Name rules after audiences, not actions: “Partners” reads better in an entry list than “Hide field 3”.
  • Put the most specific rule first. A “UK on mobile” rule belongs above a general “Mobile” rule.
  • Prefer Show for optional extras such as promo codes, so they appear only for the people who should see them.
  • Keep required fields safe. Hiding a required field is fine; it is removed for that visitor and never blocks the submission.
  • Test with real links. Add ?utm_source=newsletter or your own parameter to the page address and open it in a private window to see the form as a new visitor would.
  • Connect your automations. Because the rule name is stored on the entry and available as a merge tag, you can pass it on to the tools you already use, for example through Zapier or Make.

Getting started

Install and activate the add-on, activate your licence key under Forms → Settings → Personalization, then open any form and go to Settings → Personalization. Tick Personalize this form, add a first rule for your most important audience, and add {personalize:text} to the confirmation. The add-on works with Gravity Forms 2.9 and newer. You can read every option in the Gravity Forms Content Personalization documentation, or see pricing and features on the Gravity Forms Content Personalization Premium Add-on page.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr