Marketing Automation Website Integration

Integrating your Sendloop marketing automation with any website, including your e-commerce or SaaS sites, is as simple as adding a code snippet.

Integrating Marketing Automation with Your Website

After logging into the Sendloop Dashboard, click on Automation in the top navigation bar. If this is the first time you've access this section, you'll be redirected to the Getting Started page.

The Getting Started page displays instructions similar to those that will be covered in this article.

Adding Sendloop Marketing Automation Tracking to Your Site

The first thing you'll need to do is to add a tracking pixel to your each of your website's pages. This JavaScript contains information specific to your account and helps Sendloop link your data to your account.

The tracking code looks something like this:

<!-- Sendloop Marketing Automation - Tracking Pixel - Begin -->
<script type="text/javascript" charset="utf-8">
window.sltracker_settings = { 'sl_user_id': "xxxx/xxxx" };
!function(key) {var methods = ["identify", "track"];function dummySltracker() {var self = this;function proxy(command) {self[command] = function() {return self._queue.push([command].concat(, 0))), self;};}for (self._queue = [], i = 0; i < methods.length; i++) {proxy(methods[i]);}}window.__sndlp = window[key] = window[key] || new dummySltracker;window.__sndlp.methods = methods;}("sltracker");
(function () {var w = window;var d = document;function l() {var s = d.createElement('script');s.type = 'text/javascript';s.async = 1;s.src = ('https:' == document.location.protocol ? 'https://' : 'https://') + '//';var x = d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);}if (w.attachEvent) {w.attachEvent('onload', l);} else {w.addEventListener('load', l, false);}})();
<!-- Sendloop Marketing Automation - Tracking Pixel - End -->

You will want to add this to all pages on your site. Do this right before the initial <head> tag of your HTML file.

Setting Up Event Tracking

JavaScript Snippets

The following snippets need to be added to your HTML page in an area beginning with <script>' and ending with</script>'. Within these tags, you can include one or more snippets.

This entire section should go directly above the final </body> tag.

After you've added the tracking pixel to all of your webpages, you can add code that tracks specific activities including, but not limited to, page visits, purchases, bounces, and so on.

For example, the following is how you track a page visit:


To track a specific event (such as a download, signup button click, or purchase), set the event type and event parameters as shown. You can pass unlimited event parameters.

sltracker.track('activity_to_track', {
    'example_activity_parameter_1': 'example_string_value',
    'example_activity_parameter_2': example_integer_value,
    'example_activity_parameter_3_date': '2017-04-19 22:16:00'

You can use three different types of parameter values:

  1. Number (e.g. 100 or 94.50)
  2. String
  3. Date

To identify a parameter as a date type, add the suffix _date to the parameter name.

Identifying Your Visitors

Now that you know there's activity occurring on your website, you can identify the person active on your site.

This sample tracking code shows how you can identify the user and track his or her activity for every visit. Be sure that the .identify event executes before the .track event.

    'email': '<>',
    'example_parameter_1': 'example_string_value',
    'example_parameter_2': _example_integer_value,
    'example_parameter_3': '2017-04-19 22:16:00'


While you can identify only one person at a time, you can define unlimited parameters for the identifying and tracking events.

Tracking E-commerce Activities and Purchase Events

Sendloop's e-commerce tracking functionality lets you track how many sales and how much revenue you are earning from your email marketing activities. This will tell you if your email marketing campaigns are successfully converting to sales on your site or not.

In order to track e-commerce conversions, you need to gather purchase event activity:

    'email': '<>',
    'example_parameter_1': 'example_string_value',
    'example_parameter_2': _example_integer_value,
    'example_parameter_3': '2017-04-19 22:16:00'

sltracker.track('purchase', {
    'purchase_currency': 'USD',
    'purchase_amount': 243.54,
    'purchase_orderid': 'YOUR-ORDER-20392',
    'purchase_date': '2016-01-13 20:16:00'

When using the purchase event, you must return the following parameters:

  • purchase_currency
  • purchase_amount
  • purchase_orderid
  • purchase_date parameters

By setting these parameters, Sendloop can identify the purchase event and register its details to the appropriate email campaign.

Enabling E-commerce Tracking for Your Email Campaign

In order to link purchases to a specific email marketing campaign, you must enable Sendloop E-Commerce Tracker located in the Options section when creating your email marketing campaign.

Marketing Automation Website Integration

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.