Lead Tracking Setup

ShareASale’s tracking involves two 'tags' or 'pixels' which are snippets of code installed specifically on the lead confirmation 'thank you' page and in the header of every other site page. The first tag is for tracking conversions (i.e. leads) and the second for assisting with Affiliate click attribution accuracy in certain browsers.

ShareASale retrieves the customer ID or other unique customer identifier associated with the Affiliate-referred lead.

Lead Tracking Pixel Installation

A lead event is a 'conversion' where an action occurs on your site without an exchange of funds. For example, a free trial, newsletter signup, or quote request.

This section covers the anatomy of the ShareASale lead tracking pixel. The location on your site to install the tracking pixel is discussed in the section below.

The lead pixel configuration for tracking these events allows ShareASale to record each with a separate tracking ID. A lead tracking pixel will resemble the example code below (a 1x1 'pixel'-sized <img> and secondary <script> underneath):

<img id='_SHRSL_img_1' src='https://www.shareasale.com/sale.cfm?tracking=CustomerID&amount=0.00&merchantID=XXXXX&transtype=lead' width='1' height='1'> <script src='https://www.dwin1.com/!!!!!.js' type='text/javascript' defer='defer'></script>

In the above pixel example, the following <img src='…'> tracking parameters are static and should be the same for all orders. The bold section (below) is the value.

merchantID=XXXXX

Your Merchant ID (XXXXX), which can be found in the top left corner of your ShareASale account.

transtype=lead

The transtype parameter is simply set to ‘lead’ for all lead tracking pixels.

amount=0.00

The amount parameter must be passed with a hard-coded zero amount formatted to two decimal places.

In addition to the three static tracking parameters above, the pixel must include another dynamically-populated tracking variable (below):

tracking=CustomerID

The tracking parameter must always be populated with a unique record locator. The value reported here should be able to be used to locate records in your system if there is a discrepancy in the tracking data recorded by ShareASale or more likely, if you need to cancel or edit a lead commission.

Note: Dynamically populating <img> tracking pixel parameters is accomplished through macros, variables, and/or data layer attributes your site or tag manager provide. They are always delimited by an ampersand (&parameter1=value1&parameter2=value2).

Speak to your tech/dev team if you are unsure how to populate any of the documented tracking parameters.

Situational Tracking Parameters

In addition to the parameters in the section above, it is also possible to pass additional data related to the order into the ShareASale system. Each of these parameters can be appended to the pixel string with standard query string ampersands (&).

xtype=type

The Merchant Defined Type can be used to pass a value for type which can then be accessed from Tools >> Commission Rules to create particular commission structures. This is useful if there is data ShareASale should receive that does not neatly fit into another parameter’s purpose.

perlead=T

If necessary, a commission rate override for this sale transaction. This override can still be overridden by other higher commission arrangements such as Commission Rules. Values of T should be numbers, and will be interpreted as a flat amount.

autovoid=V

The autovoid parameter can be appended and set to 1 in order to allow a record to be recorded in ShareASale but not pay any commission to the Affiliate. This should only be used in multi-network tracking situations. Please contact our support team for further information.

Install the Tracking Code

Now that the ShareASale conversion tracking pixel’s various parameters are covered, we’ll need to install it in the right place on your site.

1. Find the file, template, or section of your cart admin that allows you to customize the lead 'confirmation' page:

  • It should be the page immediately after finishing a lead form on your site.

  • Make sure to find the page or place that only displays content once after finishing the lead form, and not again later such as in an email confirmation.

  • If you’re editing a file that is part of your site’s checkout, be sure to back it up beforehand.

 2. Place the tracking pixel code within the HTML <body></body> of the lead 'confirmation' page.

  • Be careful not to accidentally place the code inside another existing section of code that might become broken.

  • Don’t place it within any <noscript> tags. These only execute if JavaScript is disabled in the browser (rare for users).

  • Make sure the secondary <script src='https://www.dwin1.com/!!!!!.js' type='text/javascript' defer='defer'></script> tag is underneath the pixel <img> tag being populated with lead data.

Replace the !!!!!! in the code with your Master Tag ID.

For merchants in the Setup Wizard, you can find this within Step 4 (Tracking Code Installation). If you are live, you can find this by navigating to MY ACCOUNT > ACCOUNT DETAILS

Account Details: https://account.shareasale.com/m-account.cfm

 If you cannot locate your Master Tag ID, or would like to verify that you have one, please submit a ticket to our ShareASale support staff

Master Tag Installation

ShareASale requires a second tag that should be embedded on every page of your site. Usually this is accomplished by including the tag in a common global file, like the header or footer template. Alternatively, cart systems will often have a dedicated spot in their admin for including code like this, as it’s fairly commonly required for analytics platforms like Google Analytics.

This second tag (code provided below) watches for any ?sscid= query string parameter in the landing page URLs of your site, indicating ShareASale Affiliate traffic. If it’s present, it stores the parameter’s value as a cookie under your domain too. Later this cookie’s value is retrieved and passed to our tracking pixel. It enhances tracking in certain browsers like Safari or more restrictive user settings scenarios.

<script src='https://www.dwin1.com/!!!!!.js' type='text/javascript' defer='defer'></script>

Replace the !!!!!! in the code with your Master Tag ID.

1. Find the file, template, or section of your cart admin that allows you to place code that will be included on every page of the site.

  • The best place is the HTML <head></head> section, if possible.

  • Just install it once, not multiple times (i.e. not the header and footer by mistake).

  • If you’re editing a common global file for your site, make sure you’re editing the right one for your theme. Often carts can have multiple themes/skins, and if you change you will need to re-integrate the master tag on that new theme too.

2. Place the master tag code so that it appears on every page of your site. Congratulations! Installation is now complete. 

Testing

Now that your tracking tags have been installed, we will need to test that everything is working as expected. To do this, we’ll simulate an Affiliate referred purchase by clicking a ShareASale test link and then running a purchase on your store. If the test is successful we’ll see a record appear in your ShareASale console, which we will VOID so that it doesn’t debit commissions from your account.

If you were emailed a link to this document, a test link may have been provided to you. If it wasn’t, you can obtain one from your account by clicking here.

NOTE: If you do not click the test link your order will not track.

The test link should direct you to your own store. Once there, please purchase any item in your store. Sometimes Merchants will have a test item worth $1.00 sale price, but above $0.00 minimum.

After the purchase is complete, navigate to www.shareasale.com in your browser and log into your account. Click Reports and then click Transaction Details from the drop-down menu.

Filter the report for Affiliate ID 178 using the panel on the left. The filtered view should now show your test purchase as an entry with today’s date.

If the order tracked successfully…

Your account is now ready to use ShareASale with your store. Please contact us at ShareASale@ShareASale.com for further information about:

  • Product specific commissions (offer different commissions by product)

  • New customer incentives (offer commission bonuses for new customers)

  • Exclusive coupon codes (used for tracking conversions without link clickthrough)

If the order does not show up in the Transaction Details Report…

Please verify that you have completed all of the steps as instructed. Common mistakes include not entering the correct Merchant ID in your tracking code and forgetting to click the test link.

If after verifying all of these steps your tracking still does not work please contact our support team at ShareASale@ShareASale.com.

 

Copyright ShareASale 2021