Profile property rules fill in a subscriber's custom fields automatically from context, instead of asking people to type it. The classic example is language: a shop that runs in Estonian, English and Russian wants every subscriber tagged with the language they actually use, so campaigns can be segmented by language and automations can send the right version.
How it works
A rule has three parts:
- Field: the custom field to write, for example
LanguageorSource. The field must exist on the subscriber's list (see custom fields). - Source: where the value comes from (page language, store language, a fixed value, a URL parameter and so on).
- Mode: Only if empty writes only when the field has no value yet, Always update overwrites on every visit or signup. Use "always update" for language so a subscriber who switches to the English version of your site gets
EN.
Rules run server-side whenever a subscriber is identified through one of the three surfaces below. Values are matched to the field's type: a select field accepts only its own options (a page language et matches an option written ET, et or Estonian (ET)), numbers must be numeric, and text is capped at 255 characters. If a source has no usable value, the rule is skipped and the field is left untouched, never cleared.
Where to set up rules
Signup forms - open the form in the form builder, scroll the settings panel to Profile properties. Rules run when the form is submitted, so a footer form can stamp Source = Footer form and Language = page language on every new subscriber.
Website tracking - under Settings, Website tracking, Profile properties from website visits. Rules run on every page view and identify event for identified visitors (people who arrived through one of your emails, submitted a form, or were identified in code). Anonymous visitors are ignored. This is the rule to use for language: as soon as a known subscriber browses your site, their Language follows the language of the pages they read.
Store connections - on the store card under Integrations, Profile properties from store signups. Rules run when a customer ticks the newsletter checkbox at checkout or registration, and on cart events for customers who are already subscribers. The Store language source is the storefront language the customer was shopping in (WPML or Polylang current language, otherwise the site locale). Requires the WooCommerce plugin 1.5.0 or newer; Shopify stores do not send a locale yet.
Sources
| Source | Value | Available on |
|---|---|---|
| Page language | The <html lang> attribute of the page (falling back to the og:locale meta tag), as an uppercase code (ET, EN, RU). Set by WPML, Polylang, Shopify and most CMSs. | Forms, website tracking |
| Store language | Storefront language at opt-in, uppercase code. | Store connections |
| Browser language | The visitor's browser preference, uppercase code. | Forms, website tracking |
| Fixed value | Always the same text, for example a source or campaign name. | All |
| URL parameter | A query parameter from the page URL, for example ref or utm_source. | Forms, website tracking |
| Page URL | The page address without query string. | Forms, website tracking |
| Referrer domain | The hostname the visitor came from. | Forms, website tracking |
Setting properties from your own code
If you know a value the sources above cannot see (a plan name, a loyalty tier, a language stored in your own system), the tracking script exposes mp('set', { ... }):
mp('identify', 'customer@example.com');
mp('set', { Language: 'ET', Plan: 'Pro' });
set writes to the identified visitor's profile immediately, in "always update" mode. Only custom fields that exist on the subscriber's list are written; unknown keys are ignored. Up to 20 properties per call, strings capped at 255 characters. Payload details are in the website tracking API.
Using the properties
Once filled, a property behaves like any other custom field:
- Segment on it under Profile property:
Language equals ETgives you an Estonian audience, see segments - Branch an automation with a Profile property condition to send the Estonian, English or Russian email inside one flow
- Merge it into emails with
{{Language}}
Example: language on a WooCommerce shop with WPML
- Add a custom field
Languageof type select with optionsET,EN,RUon your list - Settings, Website tracking, Profile properties from website visits: add
Language= Page language, always update - Integrations, store card, Profile properties from store signups: add
Language= Store language, always update - Optionally the same rule on your signup forms
Existing subscribers are tagged the first time they open an email and visit the site; new ones are tagged at signup. Build one segment per language and pick it as the campaign audience.