Zarstat

Docs

WordPress

There is no official WordPress plugin yet. Paste the snippet with a header/footer plugin, or enqueue it from a child theme so a theme update does not wipe it.

Markdown · same page for crawlers. index, follow.

Custom HTML in the footer

Appearance → Theme File Editor is brittle. Prefer a “Insert Headers and Footers” style plugin, or wp_enqueue_script in the child theme.

<script>
  window.cashline = window.cashline || function () {
    (window.cashline.q = window.cashline.q || []).push(arguments);
  };
</script>
<script src="https://YOUR_ORIGIN/cashline.js" data-site="YOUR_SITE"></script>
<script>cashline('pageview');</script>

WooCommerce purchase

On the thank-you page, only fire purchase if WooCommerce marked the order paid. Zarstat does not read WooCommerce by itself. Amount is rand.

cashline('purchase', {
  amount: ORDER_TOTAL_RAND,
  currency: 'ZAR',
  reference: 'WC-ORDER-ID'
});

Paystack visitor_id

If you charge with Paystack, pass the first-party visitor id on initialize metadata so the later purchase sits on the same person. See /docs/paystack. Plans stay TEST.

const id = cashline('identity');
// id.visitor_id → Paystack metadata.visitor_id
// After verify or charge.success:
cashline('purchase', { amount: 199, currency: 'ZAR', reference: 'PS_REF' });