Docs
Vue
Vue has no official plugin. Load cashline.js once (index.html or a client plugin), fire pageview after the app is on the page, and pass visitor_id to Paystack yourself. zarstat() is an alias for cashline(). Amount is rand.
Markdown · same page for crawlers. index, follow.
index.html
Put the queue and script before the Vue mount. data-site is the site you already use. Host /cashline.js on this origin when you can.
<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>Pageview after mount
Call pageview once the client is running. The snippet also sends a pageview on history.pushState.
import { onMounted } from "vue";
onMounted(() => {
const track = window.zarstat || window.cashline;
if (typeof track === "function") track("pageview");
});Paystack visitor_id
Read identity in the browser and put visitor_id on Paystack initialize metadata. Fire purchase after verify. See /docs/paystack.
const id = cashline('identity');
cashline('purchase', { amount: 199, currency: 'ZAR', reference: 'PS_REF' });