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?
- How does the Beacon pixel work?
- What types of tracking does the Beacon tracking pixel provide?
- When does Beacon start tracking contacts?
- Where can I find website activity reporting?
- How do I install Beacon?
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.
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:
-
<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. -
<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. Theasync
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. -
<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.
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 |
When does Beacon start tracking contacts?
Beacon will begin tracking when:
- A contact subscribes to your list via a Sendlane Form
- 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:
- Safari private browsing on iOS and macOS
- Chrome Incognito browsing on iOS, Android, and desktop
- Firefox private browsing on iOS, Android, and desktop
Where can I find website activity reporting?
You can view website activity reporting in:
- The site tracking section of the dashboard
- The tracking section of campaign and automation reports
Once tracking begins, please allow up to 24 hours for reporting to populate accurately.
How do I install Beacon?
The process for installing Beacon varies depending on your eCommerce integration:
- Shopify Native/non-headless stores
- Shopify Hydrogen/headless stores
- Custom integration stores
- BigCommerce non-headless store users do not need to manually install Beacon because it is automatically installed with the BigCommerce integration