Custom properties
Attach your own data to events and pageviews, and choose which properties appear as breakdowns on the dashboard.
Custom properties are key/value pairs you attach to what Trace records — a visitor's plan, an A/B test variant, the author of a blog post. They let you break down and filter every report by your own data.
Sending properties
On a single event
Pass an object as the second argument of a custom event:
window.datafast("checkout_started", { cart_value: "49.00", plan: "pro" });On every event
props attaches properties to every event from that point on — pageviews included — until the page is reloaded. Later calls merge into what was set before rather than replacing it.
window.datafast("props", { plan: "pro", ab_test: "variant_b" });Call it once near the top of the page (for example as soon as you know a signed-in user's plan) and you don't have to repeat the values on each event. props isn't an event itself.
The limits for custom events apply: up to 10 properties per call, names of up to 32 letters, numbers, underscores and hyphens, values up to 255 characters, and at most 30 properties on one event including those set with props.
Showing properties on the dashboard
Every property you send is stored. Which ones the dashboard offers as breakdowns is up to you, in Settings → Custom properties:
- Click Add property.
- Pick a property name from the suggestions (names your site has sent in the last 6 months, most used first) or type a new one to create it.
- If you're already sending properties, use Click to add N existing properties we found to add them all at once.
Removing a property from the list only hides it from the dashboard — the data stays. A site can list up to 300 properties. The Show in dashboard switch turns the Properties report off entirely.
The Properties report
On the main dashboard, the Properties tab of the Goals card has a dropdown to pick a property. For the chosen property it lists each value with its visitors, events and share (or conversion rate, while a goal filter is on).
- View details opens the full breakdown: searchable, sortable and paged.
- Click a value to filter the whole dashboard to visits that carry it.
- Properties are also available in the filter menu on every page, and show under each event in a session's timeline.
Using properties in goals
A goal can require property values, for example counting only signup events where plan is pro. See Narrowing a goal with properties.