Skip to main content
Important: Please ensure your CMP configuration includes new Vendor ID 1469 for 1st Party data tracking. Additionally, include Vendor ID 301 if cookie sync is enabled. Learn more
The setEventProperties and setEventNameProperties methods are used to send custom events to Zeotap along with specified event properties and name.

Syntax

Parameters

Usage Examples

Event Name Only

If you only need to track the event name without additional properties, use setEventNameProperties:
The payload with event name only:
Event name only in payload

Basic Event Tracking

The payload with event name and properties that passed to the function:
Event with properties in payload

Event with Callback

Best Practices

Event Naming

  • Use descriptive, snake_case names: product_viewed, checkout_completed
  • Be consistent across your application
  • Avoid special characters and spaces

Property Structure

Error Handling

Common issues and solutions:
  • Invalid event name: Ensure event names are strings and follow naming conventions
  • Large payloads: Limit property object size to avoid network issues
  • Network failures: Implement callback error handling for critical events

For more examples and advanced usage patterns, see our Examples Guide.
Last modified on June 25, 2026