rocketInstall & Configure

GitBook Assistant

You're about to unlock powerful web and marketing data. Let's get you set up!

circle-info

Need your Account ID? Find it in the URL when viewing your account: app.listenlayer.com/account/abc123 → your ID is abc123


Choose Your Method

Install with GTM

The simplest way to get started. No code changes to your website!

Option A: Use Our Wizard

Let us do the work for you:

  1. Go to SettingsInstallation

  2. Click Install with GTM

Done! We'll add the tag to your GTM container automatically.

Option B: Add It Yourself

  1. TagsNew → name it ListenLayer

  2. Tag ConfigurationCustom HTML

  3. Paste this:

<script src="https://sdk.listenlayer.com/ll.js?id=YOUR_ACCOUNT_ID" async></script>
  1. TriggeringAll Pages

  2. Save and Publish

circle-check

Verify It's Working

Quick check to make sure everything's connected:

  1. Visit your website

  2. Press F12 to open Developer Tools

  3. Go to the Network tab and refresh the page

  4. Filter for ll.js — you should see it load with status 200

circle-check
chevron-rightTroubleshootinghashtag

ll.js not loading?

  • Double-check your Account ID in the script tag

  • Clear your browser cache and refresh

  • Check if an ad blocker is blocking the script

  • Verify GTM is published (if using GTM)

Script loads but no data in dashboard?

  • Type _ll in the Console tab — you should see an object

  • Check Console for JavaScript errors

  • Verify your domain is added in Settings → Domains

Enable Preview Mode

For deeper testing, use Preview & Debug mode to watch events fire in real-time as you browse you website. This requires enabling your website to display in an iframe.

circle-exclamation

Enable Preview for Your Website

See Preview & Debug for platform-specific instructions.


Custom Events Stub

If you're sending Custom Events, add this stub script above Google Tag Manager to prevent race conditions.

chevron-rightAdd the Stub for Custom Eventshashtag

If you're calling SDK methods like _ll.track(), _ll.ecommerce.viewItem(), or _ll.identifyPerson(), you need the stub.

Why? Your code might run before ListenLayer finishes loading. The stub catches those early calls so nothing gets lost.

Add the Stub

Paste this above GTM (or above the ListenLayer script):

Use waitFor()

Wrap your custom event calls to ensure they do not run too early:

circle-exclamation
chevron-rightFull Setup Example (Stub + GTM)hashtag

Here's what your <head> should look like:


Custom Tracking Domain

Run ListenLayer's client-side activity over your own sub-domain, increasing data reliability. We recommend that the hostname (top domain) matches your primary website domain where ListenLayer is running.

Why bother?

  • Bypass ad blockers that target third-party scripts

  • More reliable, long-term user identification

  • Keep everything on-brand and maintain user confidence

circle-info

Coming soon - want early access? Contact usenvelope!


Cross-Domain Tracking

Track visitors seamlessly as they move between your related domains—like your main website, shop, blog, or app subdomains.

circle-info

When do you need this? If your business operates across multiple domains (e.g., example.com , shop.example.com, and www.example2.com) then visitors moving across these domains are treated as separate users by default. Cross-domain tracking allows us to unifiy their activity and reduce self-referral, direct traffic.

How to Enable

  1. Go to SettingsDomains

  2. Add all domains where ListenLayer is installed

  3. Cross-Domain Tracking is autoamtically enabled for your domains, but can be disabled.

circle-info

ListenLayer's AI automatically detects your website structure and adds domains that you commonly link to an run our script on. You can lock your domains on the settings page, to avoid new domains being added automatically.

Once configured, ListenLayer automatically decorates links between your domains.

How It Works

When a visitor clicks a link from one of your domains to another, ListenLayer adds a _ll_xd parameter to the URL:

This parameter contains encoded information about the user and their device:

Field
Purpose

Source domain

Where the click originated

Timestamp

When the link was clicked (for security)

Device ID

Links the visitor across domains (for identified users)

Tracking mode

Preserves consent and tracking preferences

The target domain reads this parameter, links the device to its existing profile, and removes the parameter from the URL (keeping your URLs clean) while retaining any of your other parameters.

chevron-rightSecurity & Privacyhashtag

Time-limited validity

The _ll_xd parameter expires after 60 seconds. This prevents:

  • Bookmarked links from incorrectly linking visitors

  • Shared links from merging different visitors

  • Replay attacks

Consent-aware

  • If a visitor is in Do Not Track mode, links are not decorated

  • Consent preferences are preserved across domains

  • Anonymous visitors are linked via browser fingerprint (no PII in URL). The ll_xd is NOT an identifier for the user. For anonymous users, it simply passes their consent state across domains to ensure accurate compliance.

Automatic cleanup

The parameter is removed from the URL immediately after processing using history.replaceState, so visitors never see cluttered URLs.

Preview Mode Across Domains

When using Preview & Debug mode, additional parameters maintain your preview session across domains. You will only see these when in preview mode.

Parameter
Purpose

_ll_preview

Preview session ID

_ll_preview_salt

Ensures consistent anonymous IDs during testing

_ll_mock_geo

Preserves mock geo location for testing

This allows you to test your cross-domain setup in preview mode and see the complete visitor journey in real-time.

circle-check

Last updated

Was this helpful?