Skip to main content
All methods are called on the global zeotap object (or window.zeotap). They’re queued safely until the SDK has loaded, so you can call them immediately after the snippet.

setPageProperties

Logs a page-view event and attaches page-level properties to every subsequent event on the same page.
zeotap.setPageProperties({ name: 'Product' });
ParameterTypeDescription
propertiesObjectPage-specific properties.
Sample payload
{
  "event": {
    "eventName": "pageView",
    "eventTimestamp": 1584350000
  },
  "page": {
    "name": "Product Page",
    "url": "https://www.xyz.com/products",
    "path": "/products"
  },
  "User": {
    "zi": "user_123",
    "zs": "session_123"
  }
}
If you don’t call setPageProperties, the SDK still attaches page.url, page.path, and the referrer URL by default to every event payload.

setEventProperties

Tracks a named event with arbitrary properties.
zeotap.setEventProperties('viewProduct', {
  productID: 'prod_123'
});
ParameterTypeDescription
eventNameStringName of the event.
eventPropertiesObjectProperties attached to this event.
Sample payload
{
  "event": {
    "eventName": "viewProduct",
    "productID": "prod_123",
    "eventTimestamp": 1584350000
  },
  "page": {
    "url": "https://www.xyz.com/products/?pid=prod_123",
    "path": "/products/?pid=prod_123"
  },
  "User": {
    "zi": "user_123",
    "zs": "session_123"
  }
}

setUserProperties

Sends user attribute information attached to the current zi (and any identities set via setUserIdentities).
zeotap.setUserProperties({
  age: 25,
  gender: 'Male',
  country: 'IND'
});
country and city are blacklisted for ingestion — Zeotap derives these from the IP address. See blacklisted fields for the full list.
PII reserved keys (email, cellno, loginid, fpuid) passed to setUserProperties are hashed before being sent, the same as setUserIdentities. Prefer setUserIdentities for identities so they persist across events; use setUserProperties for everything else. Sample payload
{
  "event": {
    "eventName": "set_user_properties",
    "eventTimestamp": 1584350000
  },
  "page": {
    "url": "https://www.xyz.com/post_login",
    "path": "/post_login"
  },
  "User": {
    "age": 25,
    "gender": "Male",
    "country": "IND",
    "zi": "user_123",
    "zs": "session_123",
    "email": {
      "sha256": "f42d22f9a2de86d9ee38e8e7dee54ecfefca679b8276991a4ecb056f2cd008cb",
      "sha1": "7790bb717a66e6c379fd46b4b687cdef3ec0d98b",
      "md5": "a8c358b62218df2b0319828ef89949e2"
    }
  }
}

setUserIdentities

Captures user identities that persist across events. Identities fall into three categories: raw PII, hashed PII, and custom identities.
Identities passed via setUserIdentities are stamped in storage and persisted on every subsequent server call until you call unsetUserIdentities.

Raw PII

When you have raw PII and want either the SDK to hash it (hashIdentities: true) or to forward it as-is (hashIdentities: false).
zeotap.setUserIdentities({
  email: 'john.doe@gmail.com',
  cellno: '45454545'
});
ScenarioSDK optionsBehavior
Forward raw PII as-isareIdentitiesHashed: false, hashIdentities: falseSent unchanged.
Let the SDK hashareIdentitiesHashed: false, hashIdentities: trueSDK applies sha256 (lowercase + uppercase), sha1, md5 before sending.
ParameterTypeDescription
[properties.fpuid]StringFirst-party ID for a given user (CRM ID, DB ID, etc.).
[properties.email]StringUser’s raw email address.
[properties.cellno]StringUser’s raw cell phone number. Recommended format: code<space>number.
[properties.loginid]StringUser’s login ID. Always hashed before logging.

Hashed PII

When you’ve hashed PII client-side and want to send the hashes directly.
zeotap.setUserIdentities({
  email_sha256_lowercase: 'f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a',
  cellno_with_country_code_sha256: '...'
});
Set areIdentitiesHashed: true in init() options.
sha256 hashes must be hex with 64 characters.
Supported hashed PII keys
FieldAvailable hash variants
Emailemail_sha256_lowercase, email_sha256_uppercase, email_md5_lowercase, email_md5_uppercase, email_sha1_lowercase, email_sha1_uppercase
Cell phone (without country code)cellno_without_country_code_sha256, cellno_without_country_code_md5, cellno_without_country_code_sha1
Cell phone (with country code)cellno_with_country_code_sha256, cellno_with_country_code_md5, cellno_with_country_code_sha1
Login IDloginid_sha256_lowercase, loginid_sha256_uppercase, loginid_md5_lowercase, loginid_md5_uppercase, loginid_sha1_lowercase, loginid_sha1_uppercase
For hashing rules and recommended preprocessing, see Zeotap hashing guidelines.

Custom identities

Any first-party identifier outside the reserved PII keys — crmID, ECID, visitorID, etc. Custom identities are always forwarded as-is; hashing flags do not apply.
zeotap.setUserIdentities({ crmId: '12345' });

unsetUserIdentities

Clears persisted identities. Use this when a user logs out so subsequent events aren’t stitched to the logged-in profile.
zeotap.unsetUserIdentities(['email', 'cellno']);  // remove specific keys
zeotap.unsetUserIdentities();                     // remove all identities
ParameterTypeDescription
[removedPropertyKeys]ArrayIf provided, only these keys are removed. If omitted, all identities are cleared.

setConsent

Records the user’s consent decision. The shape of the value depends on which consent strategy you’ve configured. See Consent Resolution for the full guide.
zeotap.setConsent({ track: true, cookieSync: true, brandConsent: true });

Quick reference

setPageProperties

setEventProperties

setUserProperties

setUserIdentities

unsetUserIdentities

setConsent

Last modified on June 22, 2026