Nero Tag: Technical Documentation
This document provides technical guidance for developers implementing the Nero Tag.
Overview
- Client-side (user’s browser) using the sendToNero() function
- Server-side (your backend) using HTTPS POST requests
- user_data – information about users
- event – business outcomes and user actions
- identifiers – linking keys for cross-system tracking
Nero Tag vs Conversion Pixels
There are two ways to send conversion and post-conversion data to LifeStreet:
Nero Tag (this document)
- Client-side and server-side solution that sends JSON payloads
- Can send user data, conversion events, post-conversion events, and custom events
- Works for all traffic sources (LifeStreet-attributed and non-attributed)
Conversion Pixel (traditional approach)
- URL-based tracking pixel that you place on conversion pages
- Only sends conversion and post-conversion events (no user data or custom events}
How to send conversion/post-conversion events:
- For all traffic sources: Use either Nero Tag events or conversion pixels
- For user data or custom events: Always use Nero Tag (pixels can’t send this data)
Nero Tag Payload Components
User Data Object
User data allows you to send information about your users to LifeStreet for audience building and targeting.
Common User Data Attributes:
The following table lists standardized attribute names that LifeStreet recommends. When possible, please use these standard names. However, you are also free to include any other custom attributes that are relevant to your business.
| Field Name | Format | Examples | Notes |
|---|---|---|---|
| String | a@a.com | ||
| phone | String | +1-555-123-4567 | |
| date_of_birth | String (YYYY-MM-DD) | 1985-03-15 | Preferred over age if available |
| age | Integer (0-120) | 46 | |
| gender | String ("M", "F", or "O") | M | |
| married | Integer (0 or 1) | 1 (yes) / 0 (no) | |
| has_children | Integer (0 or 1) | 1 (yes) / 0 (no) | |
| children | Integer | 0, 1, 2, 3 | |
| zipcode | String | 60647, 97127-1143 | |
| education_level | String | high_school, bachelors_degree | |
| employed | Integer (0 or 1) | 1 (yes) / 0 (no) | |
| annual_income | String | $75,000, $50k-$70k | |
| homeowner | Integer (0 or 1) | 1 (yes) / 0 (no) | |
| vehicle_owner | Integer (0 or 1) | 1 (yes) / 0 (no) |
Example:
{
user_data: {
email: "test@example.com",
homeowner: 1,
zipcode: "90210"
}
}
Event Object
The Nero Tag supports sending three types of events:
Event Types:
- custom – Anything else: funnel steps, user interactions, operational tracking
- conversion – A primary business event like a sale, signup, or subscription
- post_conversion_1 through post_conversion_15 – Follow-up business events like renewals, upsells, or repeat purchases. Typically associated with a monetary value
Note: For conversion and post_conversion events, see the section above about choosing between Nero Tag events and conversion pixels.
Event Object Fields:
- type (required) – One of the event types above
- name (required for custom events only, but preferred for all) – A descriptive name you choose
- value (optional) – Monetary value as a number, only used for conversion and post_conversion events
- currency (optional) – Currency code like ‘USD’ or ‘EUR’. Defaults to ‘USD’ if you include a value but omit currency
- nero_product_id – You can include this value (provided by LifeStreet) when relevant
- Any other fields you want to include
Example: Custom Event
{
event: {
name: "quote_requested",
type: "custom",
insurance_type: "auto",
coverage_level: "full"
}
}
Example: Conversion Event
{
event: {
name: "account_created", // optional but encouraged
type: "conversion",
value: 1.49
// currency defaults to 'USD' if omitted
}
}
Identifiers Object
Identifiers are required for Server-to-Server tracking, and are discussed in detail in the Server-to-Server section later in this document. If used, you must provide at least one of the following:
Identifier Fields:
- user_id – Any stable user-level identifier you provide
- session_id – Any session-level identifier you provide
- device_id – Device-level identifier (AAID/IDFA)
- lifestreet_click_id – LifeStreet provided click identifier. A detailed example is provided in the S2S section of this document below.
Example: Conversion Event
{
identifiers: {
user_id: "user-12345",
}
}
Client-Side Implementation
Tag Installation:
Add the following script to all pages within your landing page flow, ideally in the <head> or at the end of the <body>. Replace YOUR_ID with the identifier provided by LifeStreet.
<script src="https://cdn.lfstmedia.com/ls/YOUR_ID/analytics.js" async></script>
This script loads the Nero Tag library asynchronously. To ensure event data is sent reliably, define the following helper function on your pages.
<script>
function sendToNero(payload) {
if (typeof Nero !== "undefined" && typeof Nero.send !== "undefined") {
Nero.send(payload);
} else {
setTimeout(function() { sendToNero(payload); }, 50);
}
}
</script>
The sendToNero() Call
All client-side data is sent using sendToNero(payload) where payload uses the same structure described in the Payload Components section above. At least one component (event, user_data, or identifiers) must be included. If you send an empty payload, the function will log a warning and take no action..
Basic Examples:
Sending a customEvent:
sendToNero({
event: {
name: "quote_requested",
type: "custom",
insurance_type: "auto"
}
});
Sending user data:
sendToNero({
user_data: {
homeowner: 1,
zipcode: "90210"
}
});
Combining a custom event and user data:
sendToNero({
event: {
name: "funnel_step_completed",
type: "custom",
step_number: 2
},
user_data: {
email: "test@example.com",
zipcode: "90210"
}
});
Sending a conversion event with user data:
sendToNero({
event: {
name: "email_submitted",
type: "conversion",
value: 0.99,
currency: "USD"
},
user_data: {
email: "customer@example.com"
}
});
Server-to-Server (S2S) Implementation
Server-to-Server events allow you to notify LifeStreet of events that occur on your backend systems, such as offline conversions.
Linking Client-Side and Server-Side Events
In order to send S2S events, you must provide matching identifiers in the following sequence:
- Client-side: First, send a sendToNero() call that includes an identifiers object with at least one identifier
- Server-side: Then, send an S2S request with the exact same identifier(s) in the payload
When LifeStreet receives both calls with matching identifiers, it links them to the same user/session.
S2S Endpoint Details
- Endpoint: https://events.dsplsm.com/s2s?api_key=YOUR_API_KEY
- Method: POST with JSON body using the same payload structure as client-side calls
- Parameters:
- api_key(required): Your private API key. LifeStreet will provide this.
S2S Examples
1. Sending in user data:
- Step 1: Establish identifier on client-side:
sendToNero({
identifiers: {
user_id: "user-12345"
}
});
This user_id should be sent to your server, so that it can be passed to LifeStreet as shown below:
- Step 2 – Send server-side user data update:
POST https://events.dsplsm.com/s2s?api_key=YOUR_API_KEY
Content-Type: application/json
{
"identifiers": {
"user_id": "user-12345"
},
"user_data": {
"email": "customer@example.com",
"homeowner": 1,
"annual_income": "$75,000"
}
}
2. Sending in a custom event:
- Step 1: Establish identifier on client-side:
sendToNero({
identifiers: {
session_id: "s_1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
}
});
This session_id should be sent to your server, so that it can be passed to LifeStreet as shown below:
- Step 2 – Send server-side custom event:
POST https://events.dsplsm.com/s2s?api_key=YOUR_API_KEY
Content-Type: application/json
{
"event": {
"name": "subscription_renewed",
"type": "custom",
"plan_type": "premium",
"renewal_method": "auto"
},
"identifiers": {
"session_id": "s_1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
}
}
3. Sending a conversion event:
- Step 1: Establish identifier on client-side:
sendToNero({
identifiers: {
session_id: "s_1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
}
});
This session_id should be sent to your server, so that it can be passed to LifeStreet as shown below:
- Step 2 – Send server-side conversion event:
POST https://events.dsplsm.com/s2s?api_key=YOUR_API_KEY
Content-Type: application/json
{
"event": {
"type": "conversion",
"value": 1.99,
"currency": "USD",
"nero_product_id": 123
},
"identifiers": {
"session_id": "s_1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
}
}
4. Sending a conversion event using the LifeStreet Click ID identifier:
In case you don’t have a notion of user_id or session_id, you can also use lifestreet_click_id to link landing page views driven by LifeStreet with your server-side events or user data.
- Step 1: Capture and store the LifeStreet Click ID on client-side:
// Capture the LifeStreet click ID and send to your backend (extracted from landing page URL)
let clickId = Nero.lifestreetClickID();
if (clickId) {
// Store this on your backend for later S2S use
sendToYourBackend({ lifestreet_click_id: clickId });
}
- Step 2: Send server-side conversion event using stored click ID:
POST https://events.dsplsm.com/s2s?api_key=YOUR_API_KEY
Content-Type: application/json
{
"event": {
"name": "purchase_completed",
"type": "conversion",
"value": 7.99,
"currency": "USD"
},
"identifiers": {
"lifestreet_click_id": "ls_click_abc123def456",
}
}
Note: You can combine event, identifiers, and user_data in the same S2S call if you want to track an event and update user information simultaneously.
GDPR Compliance
All data sent from the Nero Tag is HTTPS encrypted in transit. Personally identifiable information (PII) is encrypted at rest and LifeStreet is fully compliant with GDPR requirements. Users have the right to request access, correction, or deletion of their personal data in accordance with applicable privacy regulations.