Help Center

Merge tags for your mailing platform

The exact value each mailing platform needs in your ad tag, and what to do if yours can't hash an email.

Updated 2026-11-02

Your ad tag needs one value per subscriber: the SHA-256 hash of their email address. The eh= part of the tag carries it. MailAdx uses it to recognise a reader without seeing their address. See email hash in the glossary.

Before you start

The value must be exactly this: SHA-256 of the lower-cased email, written as 64 lower-case hex characters. MD5, subscriber IDs and upper-case hex get no ad.

Steps

  1. Find your platform below and copy its value.
  2. Paste it in place of every {{EMAIL_SHA256}} in the ad tag.
  3. Send a test to yourself, view the source of the email and check that eh= is followed by 64 lower-case hex characters.

Platforms that hash at send time

  • Klaviyo: {{ email|lower|sha_256 }}. If a test send doesn't show 64 lower-case hex characters, store the hash as a profile property called email_sha256 and use {{ person.email_sha256|default:'' }}. See Klaviyo Integration.
  • beehiiv: {{subscriber_email_hash_sha256}}. Don't use {{subscriber_email_hash}}, which is MD5.
  • Brevo: {{ contact.EMAIL|lower|hash_sha256 }}.

Platforms that can't hash

These platforms have no merge tag that hashes. Create a field, fill it with the hash for every subscriber, and keep it filled for new subscribers. A subscriber with an empty field gets no ad.

  • Mailchimp: an audience field with the merge tag *|EMAIL_SHA256|*. See Mailchimp Integration.
  • Kit: a custom field read with {{ subscriber.email_sha256 }}.

To work out the hash yourself, once per subscriber:

// Node.js
import crypto from 'crypto';
const hash = crypto.createHash('sha256').update(email.toLowerCase()).digest('hex');
# Python
import hashlib
hash = hashlib.sha256(email.lower().encode()).hexdigest()

Other platforms are covered in the integration guides.

If you can't keep a hash field filled

You can put your platform's plain email merge tag in eh=, and MailAdx hashes it on receipt and doesn't store the address. For example *|URL:EMAIL|* in Mailchimp, or {{ subscriber.email_address | url_encode }} in Kit.

With a plain email merge tag, each subscriber's address is readable in the ad URLs, by mail clients, image proxies and access logs along the way. Cover this in your privacy notice. Native ad tags accept only a hash.

The uid value

uid= is a value that differs per send. In Mailchimp the template uses *|CAMPAIGN_UID|*. Klaviyo's template leaves it blank, which is fine.

What happens next

When a merge tag is filled correctly, Tag Health counts your requests as reaching an ad decision rather than as tag problems.

If something goes wrong

Tag Health names the problem. These are the ones about this value:

  • Email hash missing. eh= was empty. The merge tag is missing from the tag, or the field it reads is empty for these readers, often new subscribers.
  • Email hash not filled (merge tag). Your platform didn't fill the merge tag. Use its exact syntax.
  • Email hash = "null". The field exists but is empty for these readers.
  • Raw email instead of hash. Send the hash, not the address.
  • Email hash malformed. The value isn't 64 lower-case hex characters. MD5, a subscriber ID or upper-case hex is the usual cause.

Related

Still stuck? support@mailadx.com