Chargify Tracking Setup

Please find the following Chargify help desk article: https://help.chargify.com/public-pages/public-page-default-settings.html#add-custom-css-and-javascript

Following the official help desk article above, you can use this code below (depending on your standalone Chargify version - Classic v1 or Modern v2) to install ShareASale's tracking within your Chargify cart Custom JavaScript fields:

Modern v2:

Make sure that you replace the XXXXX in the code with your ShareASale Merchant ID. You can find this at the top-left of your ShareASale account when you are logged in.

+ - - - - Start Modern Page Pixel - - - - + if (jQuery('.public-signup-page__success').length === 1) { // Settings: var sas_merchantID = 'XXXXX'; // Begin Scraper var sas_amount = (jQuery('div.success-receipt__total > dl > dd').text()).split('$')[1]; var sas_name = (jQuery('div.success-receipt__heading > h2').text()).split(' ')[1]; var sas_ts = new Date(); var sas_orderID = encodeURIComponent(sas_name + sas_ts); // End Scraper // Begin Pixel Setter var sas_src = "<https://shareasale.com/sale.cfm?merchantID="> + sas_merchantID + "&amount=" + sas_amount + "&tracking=" + sas_orderID + "&transtype=sale"; // Create the parameter string and append it to the pixel target. var sas_Pixel = new Image(); // Create a new image tag. sas_Pixel.src = sas_src; // Set the src parameter of the image tag to the target parameter string. document.body.appendChild(sas_Pixel); // Append the newly created pixel to the body of the page. // End Pixel Setter } + - - - - End Modern Page Pixel - - - - +

 

If you're using an older version of Chargify, you may not have the Modern (v2) field. You'll need to enter the following code into the field labeled "Custom JavaScript Classic (v1)."

Classic v1:

Make sure that you replace the XXXXX in the code with your ShareASale Merchant ID. You can find this at the top-left of your ShareASale account when you are logged in.

+ - - - - Start Classic Page Pixel - - - - + if (jQuery('#hosted-payment-history').length !== 0) { // Settings: var sas_merchantID = 'XXXXX'; // Begin Scraper var sas_amount = jQuery('div.success-receipt__total > dl > dd').text().split('$')[1]; var sas_name = (jQuery('div.success-receipt__heading > h2').text()).split(' ')[1]; var sas_ts = new Date(); var sas_orderID = encodeURIComponent(sas_name + sas_ts); // End Scraper // Begin Pixel Setter var sas_src = "<https://shareasale.com/sale.cfm?merchantID="> + sas_merchantID + "&amount=" + sas_amount + "&tracking=" + sas_orderID + "&transtype=sale"; // Create the parameter string and append it to the pixel target. var sas_Pixel = new Image(); // Create a new image tag. sas_Pixel.src = sas_src; // Set the src parameter of the image tag to the target parameter string. document.body.appendChild(sas_Pixel); // Append the newly created pixel to the body of the page. // End Pixel Setter } + - - - - End Classic Page Pixel - - - - +

Testing

Now that your tracking code has 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