Event names

As well as being able to send any arbitrary event names, datahappy understands the following events and their intrinsic meaning.

<aside> 💡 If you’ve implemented the datahappy JS SDK, the convenience methods automatically set the below event names for you.

</aside>

Name Description
install_attribution When an app install is attributed by an MMP like AppsFlyer or Adjust.
login When a user logs in.
search When a search is performed.
lead_creation When a lead is created.
view_item When a product/piece of content is viewed.
activation When a user activates.
add_to_cart When a product is added to the cart.
begin_checkout When a checkout is started.
user_creation When a user account is created.
add_payment_info When payment information has been added.
purchase When a customer makes a one-off purchase.
trial_start When a user starts a free trial.
trial_conversion When a user completes a free trial without cancelling i.e. when the first payment is taken.
subscription_start When a customer starts a paid subscription without a free trial.
subscription_renewal When a subscription is renewed e.g. each month.
subscription_cancellation When a subscription is cancelled.

Event properties

Track the following any time there is a monetary value associated to a user action e.g. a purchase. Even new leads have an implied value if you understand your lead-to-customer conversion rate and LTV.

Name Type Description
value Float A monetary value associated with an event e.g. revenue
currency String The currency of the transaction e.g. “USD” (full list here)
transaction_id String A unique ID for the transaction.
subscription_id String A unique ID for the subscription. Only set here if you’re not passing an items array.
coupon String Optional. Discount code that was used.
shipping Float Optional. Cost of shipping.
tax Float Optional. Value added tax.
delivery_category String Optional. e.g. “home_delivery”.
items Array A list of items related to the event e.g. items in the cart or that were purchased. See below for item properties.

Items

Native properties to track items related to events.

Name Type Description
item_id String Unique identifier for the item being purchased.
item_name String Human-readable name of the item.
is_subscription Boolean Indicates whether the item is a subscription or not.
subscription_id String Unique identifier for the subscription.
affiliation String Store or business affiliation from where the item originates.
coupon String Code for any discount coupon applied.
discount Float Monetary discount applied to the item's price.
index Integer Position index of the item, often used in a list or cart.
item_brand String Brand of the item.
item_category String Category to which the item belongs.
item_list_id String Identifier for the list in which the item appears.
item_list_name String Human-readable name of the list in which the item appears.
item_variant String Specifies the variant of the item (e.g. colour, size).
location_id String Identifier for the store location from where the item was purchased.
price Float Price of a single unit of the item.
quantity Integer Number of units of the item being purchased.

User traits

datahappy uses the same reserved user trait names as Segment and RudderStack for full API compatibility.

Name Type Description
firstName String First name of a user.
lastName String Last name of a user.
name String Full name of a user. If you only pass a first and last name datahappy automatically fills in the full name for you.
email String Email address of a user.
phone String Phone number of a user.
title String Title of a user, usually related to their position at a specific company. Example: “VP of Engineering”.
companyName String Company the user represents.
company Object Company the user represents, optionally containing: name (String), id (String or Number), industry (String), employeeCount (Number) and plan (String).
address Object Street address of a user optionally containing: streetcity, region, state, postalCode, country & countryCode (ISO 3166-1 alpha-2 standard).
gender String Gender of a user.
birthday Date User’s birthday.
website String Website of a user.
message String A message from the user e.g. for lead capture.
description String Description of the user.
createdAt String Date the user’s account was first created. datahappy recommends using ISO-8601 date strings. If not set datahappy will set to the date the event is triggered.