LemonStand integration
An ecommerce platform for retailers who want to grow their business.
This is an integration method for LemonStand shopping cart. The integration code is maintained with ‘Partials’ inserted into Templates and Pages.
Click tracking
The first step is the click tracking integration. Here is a description where to insert the click tracking code, which is necessary for sale tracking.
First of all, navigate to your Store Design > Editor > Partials and click the ‘layout-footer‘ partial. Add the click tracking code to the end of the file:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
try {
PostAffTracker.track();
} catch (err) { }
</script>
Save your code.
Sale tracking
The sale tracking integration is an easy process as well. Navigate to Store Design > Editor > Pages and click the Receipt page.
Add the following sale tracking code after this line:
{% if invoice %}
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost('{{ invoice.subtotal }}');
sale.setOrderID('{{ invoice.order.number }}');
PostAffTracker.register();
</script>
If you want to track customer email (for Lifetime Commissions) you can use this variable:
{{ customer.email }}
Save your code. If you want to track per product commissions, you should follow the next step instructions.
Product Id matching
In case you wanted to track per product information, use this sale tracking code, instead of the one in step 2.
Navigate to Store Design > Editor > Pages and click the Receipt page. Add the following sale tracking code after the line:
{% if invoice %}
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
var i = 1;
PostAffTracker.setAccountId('Account_ID');
{% for shipment in invoice.shipments %}
{% for item in shipment.shipmentItems %}
var sale = PostAffTracker.createSale();
sale.setTotalCost('{{ (item.quantity * item.pivot.price) }}');
sale.setOrderID('{{ invoice.order.number }}(' + i + ')');
sale.setProductID('{{ item.product.sku }}');
PostAffTracker.register();
i = i + 1;
{% endfor %}
{% endfor %}
</script>
That’s it, save your work and you can start tracking your orders
Lemon Squeezy Affiliate Program
Lemon Squeezy offers an all-in-one platform for SaaS businesses, with a CPC affiliate program. They offer single-tier commissions and have no minimum payout. The program accepts worldwide traffic and has a lifetime cookie duration. Contact Curtis Duggan for more information.
Lemon Squeezy Affiliate Program
Learn about the Lemon Squeezy Affiliate Program's key details, campaign restrictions, rules, commissions, and more before you join.
Lemontree Ads Affiliate Program
Learn about the Lemontree Ads Affiliate Program's key details, campaign restrictions, rules, commissions, and more before you join.