Tracker
Metrics & Attributes

Metrics and Attributes Setup

This guide details how to configure metrics and attributes to effectively utilize data collected by the Customerscore Tracker. While the Tracking Code Setup covers the implementation of the script, this article explains how that raw data is processed, mapped, and visualized.

How It Works

Once the Tracker is successfully configured, data collection begins. To make this data actionable within Customerscore, it must be mapped to specific metrics or attributes.

  • Data Collection Methods — Events can be collected via the client-side JavaScript Tracker or sent server-side via the API endpoint (allowing for batches of events)
  • Data Aggregation — Events collected are aggregated once a day. Events are aggregated as a 30-day rolling summary (sum of event occurrences from the last 30 days)
  • Merging Data — Tracked data is merged with other existing data sources and displayed on the corresponding Contact or Customer entity
  • Entity Creation — Contacts are automatically created by the Tracker if they are new. However, Customers are not created by the Tracker; the Customer entity must already exist in the Customerscore app for the data to be processed
  • Filtering — Only events and data that have a corresponding metric or attribute configured in the system are merged. Unmapped events are effectively ignored during the merge process

Mapping via Codename

The link between the code and the dashboard is the codename. The codename field in your metric/attribute configuration must match exactly the event name or the data key sent by the tracker.

Supported Types

Currently, the tracker supports number and string data types.

Scope

You can track events at the Contact level or Customer level.

  • Grouped Metrics — On the Customer level, you can set up a "Grouped metric." This counts all events of a given name associated with the Customer, even if specific contact information is missing.

Important Configuration Notes

⚠️

Data Latency: Because data is aggregated daily, you will not see data immediately after setup. Please allow up to 24 hours for the first batch of events to appear in your metrics.

⚠️

Case Sensitivity: The Codename field is case-sensitive. If your code sends an event named new_Order, but your metric codename is new_order, the data will not match. Ensure your naming is consistent.

Where to Configure

You can configure these settings in the Settings menu. Define your metrics and attributes based on the level (Customer vs. Contact) you wish to track:

  • Settings → Metrics → Customer metrics
  • Settings → Metrics → Contact metrics
  • Settings → Attributes → Customer attributes
  • Settings → Attributes → Contact attributes

You can set up Metrics and Attributes when there are some tracked data directly on the Tracker page. Navigate to Settings → Tracker, section Metrics and Attributes (app.customerscore.io/settings/tracker (opens in a new tab)), review a list of currently tracked events to create Metrics for customer or contact, and review a list of Customer/Contact data to create Attributes for customer or contact.

When creating a Grouped Metric (a Customer metric that aggregates contact-level events), checking the "Grouped metric" box allows you to select the underlying contact metric from a dropdown list.

Metrics and attributes setup

Example Configuration

To illustrate the setup, let's look at a standard scenario where we want to track user identification details, specific page visits, and new orders.

Events Sent by Tracker Code (or API)

Below represents the raw events and data keys being sent from your application via the CustomerScoreTracker methods (like .identify() and .track()).

Identify Call

  • Event: identify
  • Additional Data: contact_name, email

Page Views (Hard or Soft Navigation)

  • Event: page view
  • URL Context: example.com (Homepage)
  • URL Context: example.com/contact-form
  • URL Context: example.com/special-request

Custom Event

  • Event: new_order (tracked via .track() method, sent after user identification)
  • Additional Data: contact: {order_value: 100}

Configured Metrics and Attributes

To capture the data above, you would configure the following mappings. Note how the Codename corresponds to the event names or data keys from the code.

Contact Metrics (Source: Tracker)

These metrics count how many times a specific event occurred for a contact.

NameCodenameTypeDescription
LoginidentifyNumberSystem metric counting identify calls
Homepage visitsexample.comNumberCounts views of the homepage
Contact form visitsexample.com/contact-formNumberCounts views of the contact form
Ordersnew_orderNumberCounts occurrences of the new_order event

Contact Attributes (Source: Tracker)

These attributes store specific values sent alongside events.

NameCodenameTypeDescription
Contact namecontact_nameStringSystem attribute for the name
EmailemailStringStores the contact email
Last order valueorder_valueNumberStores the value from the new_order event

Customer Metrics (Source: Tracker)

These metrics aggregate data at the company (Customer) level.

NameCodenameTypeDescription
Special request visitsexample.com/special-requestNumberCounts visits to the special request page
Orders countordersNumberGrouped metric. Linked to the Contact Metric "Orders". Counts all new_order events for the customer