Skip to main content

Click to Email

When to Use

Trigger this event when a visitor clicks on an email address link (mailto: link) on your website, indicating intent to send an email to your business.

Complete Reference

event object required

name string required

info

Use only static value click_to_email for event.name.

name: "click_to_email"

value number required

info

Estimated value of an email lead. Set to 0 if not applicable.

value: 30.00

currency string required

info

Currency code. Use your default currency.

currency: "EUR"

exchange_rate number

info

Custom exchange rate for multi-currency. Default is 1.

exchange_rate: 1

id string

info

Optional event identifier.

id: "CLICK_EMAIL_12345"

properties object recommended

info

Custom Event Properties Examples

properties: {
cancel_reason: "returning",
}

context object

url string required-if-applicable

info

Collected automatically for standard websites. Required only for SPA applications where URL changes don't trigger automatic page context updates.

url:"https://shop.example.com/products/laptop?color=silver&storage=512gb&utm_source=google"
warning

URL Parameter Sensitivity: Be mindful of sensitive information in URLs. Query parameters may contain personal identifiers, session tokens, or private information that should be handled according to privacy regulations.

page_type string recommended

info

Type of page (product, home ...)

page_type: "product"

environment string recommended

info

Allowed values: prod, dev

environment: "prod"

user object recommended

id string recommended

info

Unique customer identifier in your system.

id: "CUSTOMER_INTERNAL_ID"

email string recommended

info

Customer email address(es) provided in plaintext or as SHA-256 hashed values.

email: "[email protected]" 
// or
email: "3e1ufd1rdnh8l1rfz6xlreyw2yryd4zrf8zsk1pxh2x8wbsp2mw1g93rs5nx68dq"

phone string recommended

info

Customer phone number(s) in E.164 format (plaintext) or as SHA-256 hashed values.

phone: "+40712345678"
// or
phone: "unw5r66oikql4n4tlg2c54bkd2npephsbwwhxuoxreu6ph8uv6k424y9x15opy9y"

first_name string recommended

info

Customer first name

first_name: "John"

last_name string recommended

info

Customer last name

last_name: "Doe"

country string

info

Country name or ISO country code

country: "Romania"

region string recommended

info

State, province, or region name

region: "Bucuresti"

city string recommended

info

City or locality name

city: "Bucuresti"

street string

info

Street address including number

street: "Strada Principala 1"

postal_code string

info

Postal code or ZIP code

postal_code: "700000"

orders_total_number number recommended

info

Cumulative number of orders placed by this user

orders_total_number: 5

orders_canceled_number number recommended

info

Cumulative number of orders placed and canceled by this user

orders_canceled_number: 0

orders_total_value number recommended

info

Cumulative lifetime user orders value (decimal format: 2500.50)

orders_total_value: 1234.99

orders_refunded_value number recommended

info

Cumulative lifetime user orders value canceled (decimal format: 2500.50)

orders_refunded_value: 250.99

predicted_value number

info

Predicted lifetime value of a customer for your business

predicted_value: 100.99

created_at number recommended

info

Timestamp in milliseconds since Unix epoch representing the first time the user was recorded

created_at: 1754926521690

properties object recommended

info

Custom Customer Properties Examples

User Segmentation

Use the properties object to store custom user attributes, with property names defined by each business as needed, that enable advanced segmentation, personalization, and analytics across your marketing campaigns.

properties: {
customer_type: "returning",
membership_level: "platinum",
preferred_category: ["electronics", "fashion"],
last_purchase_date: "2024-12-15",
average_order_value: "350.00",
payment_method_preference: "card",
registration_date: "2023-06-15"
}

Examples

{
"event": {
"name": "click_to_email",
"value": 30.00,
"currency": "EUR",
"exchange_rate": 1,
"properties": {
"click_location": "footer",
"page_section": "contact_info"
}
},
"context": {
"url": "https://example.com/about",
"page_type": "about",
"environment": "prod"
},
"user": {
"id": "CUST_12345",
"email": "[email protected]",
"phone": "+40712345678",
"first_name": "Alexandru",
"last_name": "Popescu",
"country": "RO",
"region": "Brasov",
"city": "Brasov"
}
}