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:
- In your WhatConverts profile, select “Tracking” from the top menu.
- Select “Transactions”.
- Toggle Enable Transaction Tracking on.
- 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