Set Up Transaction Tracking

Transaction Tracking allows you to record completed online purchases as leads in WhatConverts. Each transaction captures sales details, attribution data, and customer information to show which marketing efforts drive real revenue.

Step 1: Enable Transaction Tracking

To enable transaction tracking:

  1. In your WhatConverts profile, select “Tracking” from the top menu. 
  2. Select “Transactions”.
  3. Toggle Enable Transaction Tracking on.
  4. Click Update Transaction Tracking to save your changes.

Step 2: Add the Transaction Tracking Code

Once tracking is enabled, you’ll see your unique Transaction Tracking Code.

This code should be added to the confirmation or “Thank You” page that appears after a customer completes a purchase.

Make sure to include your WhatConverts tracking script before this code on the page.

Javascript
<script type="text/javascript">
$wc_leads.track.transaction
(
 '12345', // Replace with your order ID - Required  
 '25.65', // Replace with your order total - Required  
 '2.56',  // Replace with your order tax - Required (Use 0 for no value)  
 '1.53'   // Replace with your order shipping - Required (Use 0 for no value)
);
</script>

Step 3: Pass Additional Transaction Details (Optional)

You can also pass additional data, such as the customer’s name and email address by modifying the code:

Javascript
<script type="text/javascript">
$wc_leads.track.transaction
(
 '12345',
 '25.65',
 '2.56',
 '1.53',
 {
   'Full Name': 'John Doe',
   'Email Address': 'john.doe@example.com'
 }
);
</script>

This additional data is included in the lead details and reporting view within WhatConverts.

Step 4: Confirm Data in WhatConverts

After installation, test a live transaction to verify the data appears correctly under your Leads tab. Each transaction will include details such as:

  • Order ID
  • Sales Value
  • Tax and Shipping Values
  • Marketing Source, Medium, and Campaign

(Optional) Send Transaction Data via Webhook

If your setup uses a webhook integration, WhatConverts can also send transaction data as a POST request in JSON format to your webhook URL.

Example payload:

JSON
{
  "lead_type": "Transaction",
  "sales_value": 156.87,
  "transaction_id": "12345",
  "transaction_tax": 2.56,
  "transaction_shipping": 1.53,
  "additional_fields": {
    "full_name": "John Doe",
    "email_address": "hello@whatconverts.com"
  },
  "lead_source": "google",
  "lead_medium": "cpc",
  "lead_campaign": "lead generation"
}

This allows advanced setups to sync transaction data with external CRMs or analytics tools.

Related Topics

Get a FREE presentation of WhatConverts

One of our marketing experts will give you a full presentation of how WhatConverts can help you grow your business.

Schedule a Demo
ready to get marketing clarity?

Grow your business with WhatConverts

14 days free trial Easy setup Dedicated support
G2 Best Results Summer 2025 Badge
G2 Best Relationship Summer 2025 Badge
G2 Best Usability Summer 2025 Badge
G2 Most Implementable Summer 2025 Badge
G2 Momentum Leader Summer 2025 Badge