# How to track lead source in LiveChat

Give your LiveChat reps the marketing context they need before they reply. Every conversation, paired with the source, campaign, and pre-chat journey behind it.

Source: https://sourceloop.ai/help/track-lead-source-in-livechat/
Updated: 2026-05-28

---

LiveChat has been in the customer-conversation game longer than most, polished workflows, deep CRM integrations, mature analytics inside its own platform. The one report it can't show you is which marketing channel actually delivered each visitor to the chat. SourceLoop layers that data on without rewriting any of your LiveChat setup.

Three steps, around five minutes, attribution flowing on every conversation afterwards.

## What SourceLoop captures from LiveChat

Every LiveChat conversation that captures an email lands in SourceLoop tagged with:

- **Acquisition channel** of the visitor (organic, paid, referral, social, direct)
- **UTM parameters** from the landing URL
- **Pages browsed** in chronological order before the chat
- **Time on site** ahead of the conversation
- **Number of distinct sessions** before they engaged
- **Email + name** captured during the chat
- **First-touch landing page** of the visitor's history
- **Source of the converting session** that produced the conversation
- **Device, country, browser**

## Before you start

You'll need:

- A **SourceLoop workspace** ([free trial](https://app.sourceloop.ai/sign-up))
- **Edit access** to your site's `<head>` markup
- A **LiveChat account** with the widget already embedded on your site

## Step 1: Add SourceLoop's snippet to your site

Inside SourceLoop, head to **Setup -> Tracking code** in the sidebar and copy the snippet.

![SourceLoop Setup page with the tracking code snippet ready to copy](/help/screenshots/sourceloop-tracking-code-script.png)

Add it to your site's `<head>`. Common paths:

- WordPress: header-injection plugin or `header.php`
- Webflow: Project Settings -> Custom Code -> Head Code
- Framer: Site Settings -> General -> Custom Code -> Start of head
- Shopify: Online Store -> Themes -> Edit code -> `theme.liquid`
- Tag manager: an All Pages tag

LiveChat and SourceLoop coexist happily, both can load on the same page, the order doesn't matter. They just both need to be on every page where you want to capture leads from chat.

## Step 2: Confirm the LiveChat widget is on tracked pages

No configuration changes needed inside LiveChat. Once SourceLoop loads on a page where the LiveChat widget also loads, conversations from that page are attributed automatically.

Worth checking:

- The LiveChat widget is **enabled** on every page where you want to capture leads
- The widget's **pre-chat form** or chatbot flow captures an email at some point
- Your performance plugins or ad blockers aren't blocking either LiveChat or SourceLoop

> **Chats from direct LiveChat URLs aren't attributable**
> LiveChat hosts conversations at its own direct URL (`direct.lc.chat/...`) when shared externally. Visitors hitting that URL never load your tracked site, so SourceLoop can't pin a marketing source to the conversation. Route campaigns to your own pages where the widget loads.

## Step 3: Send a verification chat

Open your site in an **incognito tab** with `?utm_source=test&utm_medium=verify&utm_campaign=livechat-check` appended to the URL. Click the LiveChat widget, start a conversation, and share an email you can access.

Within seconds of the email being captured, the conversation should appear at the top of the **Contacts Hub** in SourceLoop with the three test UTM values stamped on the record.

## Where to see LiveChat conversations in SourceLoop

### Contacts Hub

Every LiveChat conversation that captures an email becomes a contact row at [app.sourceloop.ai/contacts](https://app.sourceloop.ai/contacts). Open a contact for the visitor's complete pre-chat browsing path, useful context before your rep replies.

![SourceLoop Contacts Hub showing a LiveChat conversation lead with the visitor's full pre-chat journey](/help/screenshots/sourceloop-lead-journey-demo.webp)

### Attribution dashboard

For the channel rollup, [app.sourceloop.ai/dashboards/traffic](https://app.sourceloop.ai/dashboards/traffic) groups LiveChat conversations by source, medium, and campaign. A quick read on which channels actually open dialogue with real prospects vs. which only generate pageviews.

![SourceLoop attribution dashboard with LiveChat conversations grouped by source and campaign](/help/screenshots/sourceloop-attribution-dashboard.webp)

### Funnel reports

Build a funnel at [app.sourceloop.ai/funnels](https://app.sourceloop.ai/funnels/) ending in "LiveChat conversation". Slice by source, landing page, or device to find which routes drive real engagement.

![SourceLoop funnel report ending in a LiveChat conversation conversion step](/help/screenshots/sourceloop-funnel.png)

If paid acquisition fills the chat queue, forward LiveChat conversations back to **Google Ads, Meta, and LinkedIn as offline conversions** so the bidding algorithms optimise toward actual qualified conversations. [Connect your Google Ads account](/help/connect-google-ads/) walks through the setup.

## Frequently Asked Questions

### Does this work on LiveChat's Starter plan?

Yes. SourceLoop's tracking is browser-side and tier-agnostic, every LiveChat tier from Starter to Enterprise behaves the same once the widget loads on a tracked page.

### I use both LiveChat and ChatBot.com (same vendor, different product). Does the bot get attributed too?

Yes, the chat that captures email is what attribution attaches to. Whether the conversation is human-handled in LiveChat or bot-handled via ChatBot doesn't matter, the email collected during the flow ties the journey to the contact.

### My LiveChat is configured with a pre-chat survey. Will email collected there work?

Yes. The pre-chat survey email is captured the same way as one shared mid-conversation. SourceLoop attaches attribution as soon as the email is identified.

### Does this conflict with LiveChat's existing Salesforce, HubSpot, or Pipedrive integrations?

No. LiveChat continues to sync conversations and contacts to every connected CRM exactly as configured. SourceLoop captures attribution on its own side, so the same contact appears in your CRM with full conversation history and in SourceLoop with marketing source data.

### We support LiveChat across mobile apps and web. Does mobile-app chat get tracked?

Web sessions are what SourceLoop tracks (marketing channels live on the web). Mobile-app chats inside your native app go through LiveChat's mobile SDK and don't carry a marketing source in the same way. SourceLoop attribution covers web visitors specifically.
