Skip to main content

Tracking Scripts

How to Implement Hello Clever Tracking Scripts


Add the code block below into your header tag

<head>
<script src="https://helloclever.co/lib/clever-tracking/importer.js">CleverImporter({env: 'production'})</script>
</head>

// or you can import the script directly from production url
<head>
<script src="https://helloclever.co/lib/clever-tracking/production/index.js"></script>
</head>
// dev url
<head>
<script src="https://helloclever.co/lib/clever-tracking/development/index.js"></script>
</head>

Initialize Hello Clever Tracking

note

If you are using direct import, please ignore the steps below.

<body>
<!-- Your code here! -->
<script>
CleverImporter({env: 'production'})
</script>
</body>

Methods

Log Event

cleverTracking.logEvent(cleverTracking.EVENTS.PAYMENT_SUCCEEDED, {})

Events

  1. Payment Succeeded
note

key: PAYMENT_SUCCEEDED code: payment_succeeded

Params

order_id: string
amount: number
payment_method: string
  1. Payment Failed
note

key: PAYMENT_FAILED code: payment_failed

  1. Payment Refunded
note

key: PAYMENT_REFUNDED code: payment_refunded

  1. Product Click
note

key: PRODUCT_CLICKED code: product_clicked

If all the code blocks above have been implemented you will be able to use our tracking feature from the merchant dashboard.