Discover how to track conversion events for sales with Segment and LinkKit.
LinkKit’s Segment integration enables a two-way sync between your Segment workspace and LinkKit. The integration consists of two components:
- LinkKit (Actions) Destination – Track conversion events in LinkKit directly from Segment.
- LinkKit Source – Send customer activity and events from LinkKit to Segment.
In this guide, we'll focus on the LinkKit (Actions) Destination and how to track conversion events directly from Segment.
Prerequisites
Before you begin, make sure conversion tracking is enabled for your LinkKit links so you can start recording and measuring conversions.
Option 1: Enable Conversion Tracking at the Workspace Level
Go to your workspace's Tracking Settings page.
Turn on the Workspace Conversion Tracking toggle.
Once enabled, conversion tracking will be applied to all future links created in that workspace.
Option 2: Enable Conversion Tracking for Individual Links
To enable conversion tracking for a particular link:
Open the LinkKit Link Builder for the desired link.
Turn on the Conversion Tracking toggle.
This will enable conversion tracking only for that link, leaving all other links unchanged.
Option 3: Enable Conversion Tracking via the API
When creating or updating a link, simply set trackConversion: true in your API request to enable conversion tracking for that link.
Once conversion tracking is enabled, you'll need to install the LinkKit Analytics script on your website to start capturing conversion events.
There are several ways to add the LinkKit Analytics script to your site:
Open your browser's developer console and enter _linkkitAnalytics.
If the script is loaded successfully, you should see the _linkkitAnalytics object returned in the console.
Add the ?linkkit_id=test query parameter to your website URL.
Verify that the linkkit_id cookie is created in your browser.
If both checks are successful, the analytics script is installed and working correctly.
If not, make sure that:
The analytics script has been added inside the <head> section of your website.
If you're using a CDN, clear or purge any cached content so the latest version of the page is served.
Configure the Segment Action
Next, set up the LinkKit (Actions) destination in Segment to track sales conversion events.
1. Add the LinkKit (Actions) Destination
Go to Segment LinkKit (Actions) and add the destination to your Segment workspace. This will allow Segment to send conversion event data directly to LinkKit.
2. Configure Your LinkKit API Key
In the LinkKit (Actions) destination settings, complete the following fields:
- Name – Enter a descriptive name to help you identify this destination within Segment.
- API Key – Enter your LinkKit API key. You can find it in the LinkKit Dashboard.
- Enable Destination – Turn this option on to allow Segment to send event data to LinkKit.
After completing the configuration, click Save Changes to apply your settings.
3. Add an Event Mapping
Next, select the appropriate action based on the type of conversion event you want to track.
Choose the action that best matches the event you want Segment to send to LinkKit for conversion tracking.
Below the selected action, you’ll see the mapping for that action.
You can customize the trigger conditions and field mappings to match your application's specific requirements.
Once you've finished configuring the mapping, click Next, then select Save and Enable to activate it for the destination.
4. Send Conversion Events to LinkKit
On your server, use the @segment/analytics-node SDK to send conversion events to Segment.
When sending events, be sure to include all relevant properties in the payload so that LinkKit can accurately attribute and track the conversion.
import { Analytics } from "@segment/analytics-node";
const segment = new Analytics({
writeKey: "<YOUR_SEGMENT_WRITE_KEY>",
});
const cookieStore = await cookies();
const clickId = cookieStore.get("linkkit_id")?.value;
segment.track({
userId: id,
event: "Sign Up",
context: {
traits: {
name,
email,
avatar,
clickId,
},
},
integrations: {
All: true,
},
});
import { Analytics } from "@segment/analytics-node";
const segment = new Analytics({
writeKey: "<YOUR_SEGMENT_WRITE_KEY>",
});
segment.track({
userId: id,
event: "Order Completed",
properties: {
payment_processor: "stripe",
order_id: "ORD_123",
currency: "USD",
revenue: 1000,
},
integrations: {
All: true,
},
});
Once the event is recorded, Segment will automatically send the conversion data to LinkKit according to the mappings you've configured in your destination settings.
Supported attributes
Lead Event Properties
The following properties can be included when sending a lead event to LinkKit:
Sale Event Properties
The following properties can be included when sending a sale event to LinkKit:
View Conversion Results
That's it — you're ready to start tracking and measuring conversions with LinkKit. As conversion data begins to flow in, you can use the available reporting views to analyze performance and gain deeper insights into your funnel.
LinkKit provides multiple reporting views to help you understand your conversion activity:
Time-Series View
Visualize conversion performance over time with a time-series chart that displays:
- Clicks – The number of tracked link clicks.
- Leads – The number of lead conversions generated.
- Sales – The number of completed sales conversions.
This view makes it easy to identify trends, measure growth, and understand how conversions progress throughout your funnel.
Funnel Chart View
Analyze your conversion funnel with a visual funnel chart that highlights conversion and drop-off rates at each stage of the customer journey:
Clicks → Leads → Sales
This view helps you identify where users are converting successfully and where potential customers are dropping off, making it easier to optimize each step of your funnel and improve overall conversion performance.
Real-Time Events Stream
Monitor conversion activity as it happens with a real-time event stream that displays every conversion event recorded across all links in your workspace.
This view provides instant visibility into:
- Lead conversions as they occur.
- Sales conversions in real time.
- Customer and attribution data associated with each event.
- Recent activity across all tracked links in a single feed.
It's ideal for monitoring live campaigns, validating tracking setups, and staying up to date with conversion activity as it happens.
