Understanding the Beacon tracking pixel

Overview

Sendlane's Beacon tracking pixel enables your Sendlane account to access information about your website visitors' activity.

Once you've installed Beacon general tracking and website visitors opt into and interact with your content, you can use data like page views, products added to cart, and more to improve your retention marketing program's outreach efforts.

In this guide


What is the Beacon tracking pixel?

The Beacon tracking pixel helps you track and understand how your contacts interact with your emails, SMS tracking links, and website.

The Beacon tracking pixel is an invisible image file embedded in emails and enabled by a JavaScript snippet added to a store's website. The tools that make up the Beacon general tracking snippet work together to collect data by setting cookies in visitors' browsers and sending tracking information back to Sendlane.

After you install Beacon general tracking, you'll see which pages contacts visit frequently, products that contacts add to their carts, and more. You can use this data to create even more targeted sends, ensuring contacts receive content they're likely interested in.

Back to top


How does the Beacon tracking pixel work?

This section is intended for advanced users and developers.

The Beacon general tracking snippet creates a small file (a cookie) stored in a website visitor's browser. This file identifies the visitor to Beacon and allows it to connect the visitor's activity to their profile in your Sendlane account.

Let's look at the general tracking code you'll find on the Beacon tab of your Account page:

The Beacon general tracking code initializes a global variable ( _Sendlane), loads a script to send tracking data (pusher.js), and records specific visitor actions (_Sendlane.push()), enabling Sendlane to capture website activity and associate it with your account.

The snippet you get when you copy your Beacon code is comprised of three JavaScript scripts:

  1. <script>
    window._Sendlane = window._Sendlane || [];
    </script>

    This script ensures that _Sendlane is always defined as an array, preventing errors when referenced in other code. In other words, this script creates space to temporarily hold tracking information.

  2. <script src="https://sendlane.com/scripts/pusher.js" async></script>

    This script loads a tool called pusher.js, which sends tracking data (events from website visitors like page views and items added to cart) to Sendlane. The async JavaScript attribute tells it to load in parallel with other resources on the page, meaning it doesn't block the page from rendering other scripts on the page.

  3. <script>
    _Sendlane.push({
        event_id: '1a2b3c4d5e'
    });
    </script>

    This script records a specific website visitor action (commonly referred to as an event), like a page view, and tags it with the unique ID automatically generated for your account. This data, displayed in a contact's timeline, can be used to create a segment based on website activity, trigger an automation, and more.

Back to top


What types of tracking does the Beacon tracking pixel provide?

Type of Tracking (links to setup guides) Description When to Use
General tracking (see install section below)
Tracks site visits as soon as the code is installed with no event or rule setup needed To monitor website views and overall engagement
Specific event tracking
Tracks visits to a specified URL To send suggested product Automations or promo codes
Conversion Rule
Assigns a specified dollar value to visits to specified pages, most often used to track purchases via checkout landing page To send post-purchase followups and information about similar products

Back to top


When does Beacon start tracking contacts?

Beacon will begin tracking when:

  1. A contact subscribes to your list via a Sendlane Form
  2. A contact subscribes to your list any other way, and they click a link in an email they receive from you

However, tracking relies on cookies being enabled in the contact's browser. If contacts clear their cookies, they must click another link in your email or sign up for your list using a Sendlane Form for Beacon to track them again.

If the Beacon tracking pixel is blocked, contacts will not be tracked in Beacon reporting or be sent through Automations such as browse and checkout abandonment. Contacts browsing using the following or other private browsing methods will not be tracked:

Back to top


Where can I find website activity reporting?

You can view website activity reporting in:

Once tracking begins, please allow up to 24 hours for reporting to populate accurately.

Back to top


How do I install Beacon?

The process for installing Beacon varies depending on your eCommerce integration:

Back to top

Did this answer your question? Thanks for your feedback! There was a problem submitting your feedback. Please try again!