Skip to main content

Merge Tags

What are merge tags?​

A merge tag is a placeholder for a personal detail. When your email is sent, your email platform replaces each merge tag with that person's details. For example, Hi {{FNAME}} becomes Hi Sarah.

OKZest uses the same merge tags inside your image link, so each person gets an image with their own details.

Merge tag formats​

Every email platform writes merge tags in its own format. In OKZest you enter the format your platform uses, so OKZest works with almost any platform.

Email platformFirst name merge tag
Mailchimp*|FNAME|*
Klaviyo{{first_name}}
HubSpot{{ contact.firstname }}
Instantly{{firstName}}
MailerLite{name}
AWeber{{!firstname_fix}}
Smartlead{{first_name}}

See the Share page instructions for more platforms and step-by-step guides. If your platform isn't listed, check its help center for "merge tags" or "personalization tags".

What you can use​

You can use any detail your platform or database holds about each person, for example:

  • First name, last name or full name
  • Email address
  • Company name or website
  • Job title
  • City, state or country
  • Order number, product name or price
  • Membership number, renewal date or points balance
  • Your own custom fields

The details must be accurate and up to date in your data source, because a wrong name does more harm than no name. See Data sources for where the data can come from.

How to add a merge tag in OKZest​

  1. In the editor, select Add content, then Dynamic text (or Dynamic image)
  2. In the layer's settings, fill in:
SettingWhat it's forExample
IDA short name for the layer. It's used as the parameter name in your image link and in the API.name
Merge tagThe merge tag in your email platform's format*|FNAME|*
Default textThe fallback text shown when the detail is missing. Leave it empty to show nothing.friend
  1. Style the text and position it on your design
  2. Save, then preview it with some test values

The IDs c, i, f and o are reserved by OKZest, so you can't use them.

Good to know​

  • You can use as many merge tags in one image as you like
  • Each dynamic layer can be styled on its own
  • Put static text before or after a merge tag in the same layer, for example Welcome back, {{FNAME}}!
  • Merge tags work for images too: a dynamic image layer can show a different picture for each person, from an image web address in your data
  • The background color or image can also change for each person, using its own ID and merge tag

URL parameters​

Every OKZest image has a link that looks like this:

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg

c is your company and i is the design. After them, you add one URL parameter for each dynamic layer, written as name=value. The name is the layer's ID (the one you set in the editor) and the value is what that layer should show.

A merge tag is how that value reaches the link. In an email, you put your email platform's merge tag where the value goes, for example first_name=*|FNAME|* in Mailchimp. When the email is sent, the platform swaps in each person's details, and OKZest draws the image for that person.

The examples on this page use a demo design with three dynamic layers: first_name (default text there), offer (default text No offer today) and photo (a placeholder image).

Syntax​

  • Start the query with c and i, then add each parameter with &: ...&i=DESIGN&first_name=Sandra&offer=Free%20shipping
  • The parameter name is the layer ID. Unknown parameters are ignored.
  • Layer IDs made through the API or MCP server use 1 to 50 letters, numbers, underscores or hyphens, and each ID is unique within a design.
  • c, i, f and o are reserved. You can't use them as layer IDs.
  • In the text of a text layer, [layer_id] is replaced with that layer's value, for example Hi [first_name]!. Only the layer's own ID is replaced, and it is replaced everywhere it appears in that layer. There are no other placeholder formats and no filters.
  • Static layers ignore their parameter.

What shows when a value is missing​

OKZest uses the first of these that has a value:

  1. The parameter in the link
  2. An HTTP request header with the same name as the layer ID
  3. The layer's default text
  4. Nothing

So first_name= (empty) shows the default text, not a blank. If there is no default text, the placeholder is replaced by nothing, and any spaces around it stay.

A merge tag your email platform doesn't replace is not spotted. If the link reaches OKZest with first_name=*|FNAME|* still in it, the image shows *|FNAME|* as text. Always send a test email to yourself before a campaign.

Encoding rules​

The value in a link must be URL-encoded. OKZest adds no special rules of its own.

CharacterWrite it asIf you don't encode it
Space%20 or + (both give the same image)
&%26The value stops at the &, and the rest is treated as another (unknown) parameter
+%2BA raw + is read as a space
#%23Browsers and email clients never send anything after a #, so the value is lost
%%25The link can be read wrongly
Accents, symbols and other non-English lettersUTF-8 percent-encoding, for example %C3%AB for ëGarbled or missing characters
An image address (https://...)Encode all of it, including any ? and & inside itThe address is cut off at the first &

How a character looks also depends on the layer's font, so check that the font has the glyph you need.

Many email platforms do not URL-encode the details they insert. If a name contains &, # or +, the image can come out wrong. Check how your platform handles this in its own help pages, and send a test with awkward values.

Parameters by layer type​

Layer typeParameter valueWhat happens
TextAny textReplaces [ID] in the layer's text
ImageA full web address starting http:// or https://The image is fetched and fitted to the layer. If the value is empty or isn't an address, the layer's default image stays
LogoA domain or web address, for example okzest.comThe logo is looked up from the domain. If you also pass an image address, that image is used instead
Website screenshotA page addressA screenshot of the page is placed in the layer
Logo or screenshot set to read the domain from an emailAn email addressThe part after the @ is used as the domain
Background image (dynamic)An image addressReplaces the background image, using the ID you gave the background
Background color (dynamic)A hex code (%23 in place of #, or no #), a CSS color name, or a color with transparencyReplaces the background color. An invalid value keeps the saved color

Output options work on every design:

ParameterValuesNotes
fjpg (default), png, webp, pdf, pdf_letterIf you use a dynamic background photo and don't set f, you get a JPG
qA whole numberImage quality
oportrait (default) or landscapePDF only. Any other value gives portrait

There is no QR code, barcode or shape layer with a URL parameter.

Worked examples​

Each link below was requested on 2026-11-12 and returned the image shown. The base link is the demo design described above.

Fill in a name​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=Sandra

One parameter changes one layer.

Demo image reading Sandra

Fall back to the default​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg

With no parameters, the layers show their default text. An empty value (&first_name=) gives the same image.

Demo image with default text

Several parameters​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=Sandra&offer=20%25%20off

Join parameters with &. The %25 is an encoded %.

Demo image reading Sandra and 20% off

A space in a value​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=Mary%20Ann

Mary+Ann gives the same image.

Demo image reading Mary Ann

An ampersand in a value​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=Tom%20%26%20Jerry

%26 keeps the & inside the value.

Demo image reading Tom and Jerry

A plus sign in a value​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=1%2B1

Demo image reading 1+1

A hash in a value​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=%23winner

Demo image reading #winner

Accents and symbols​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&first_name=Zo%C3%AB%20%E2%82%AC5

Demo image reading Zoe and 5 euros

Replace an image​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&photo=https%3A%2F%2Fpicsum.photos%2Fid%2F237%2F200%2F200.jpg

The whole image address is encoded.

Demo image with a replacement photo

Another file type​

https://media.okzest.com/img?c=AbOHw7ix50qyNXVf3fp9SQ&i=KaHn-_h98UeJXEdb4hxGvg&f=png

The same design as a PNG. f=webp gives a WebP.

Demo image as a PNG

Common mistakes​

MistakeWhat you seeFix
A raw & in a value, for example Tom & JerryThe image shows only Tom (with a trailing space), the same as first_name=Tom%20Encode it as %26
A raw # in a value, for example #winnerThe default text, because the value never reaches OKZestEncode it as %23
A raw + in a value, for example 1+11 1Encode it as %2B
An empty valueThe layer's default textSet sensible default text for every layer
A merge tag your platform doesn't replaceThe tag itself, for example *|FNAME|*, drawn on the imageCheck the tag against your platform's format, and send yourself a test
A misspelt parameter nameThe default text, because unknown parameters are ignoredMatch the layer ID exactly
An image value that isn't a full address, for example not-a-urlThe layer's default imagePass the whole https:// address, encoded
Using c, i, f or o as a layer IDNot allowed, because these are reservedPick another ID

Where to next​