In order to successfully integrate tracking for your Wix store with Stripe as your payment provider, you will need to set up your system by following the instructions in the Quick setup section on your dashboard and then configure tracking for clicks and conversions by following the guide below.
This method of integration is used if you are having your customers register or fill a contact form first before payment occurs at Stripe and at the same time you do not use Stripe payment links.
Integration steps
Install Trackdesk Stripe App
Our Stripe app is available here in the Stripe marketplace - https://marketplace.stripe.com/apps/trackdesk
Fill in all necessary information to the settings of the Stripe app and Save changes.
Tenant ID - Find your Tenant ID based on the article here
Personal token - Personal tokens can be found at the bottom of the Settings page, or a new one can be created via the Personal Tokens menu in the Settings
Set up tracking of clicks
Track clicks by including the following code on every page of your website where you want to track clicks, including all landing pages added to this offer. For best results, position the code as high as possible within the<head>
tag of your HTML document.<!-- Trackdesk tracker begin -->
<script async src="//cdn.trackdesk.com/tracking.js"></script> <script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");
trackdesk("YOUR TENANT ID", "click");
</script>
<!-- Trackdesk tracker end -->Make sure to replace YOUR TENANT ID with your actual Tenant ID based on our article here.
Set up conversion tracking
Track conversions by including the following help script on the checkout page (page where the Buy button on checkout is present).
<!-- Trackdesk help script wix stripe connection begin -->
<script async src="//cdn.trackdesk.com/tracking.js"></script>
<script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");
(function(){
document.querySelectorAll('[data-hook="payment-checkout-buy-now"]').forEach(function(paymentCheckoutBuyNow) {
paymentCheckoutBuyNow.addEventListener('click', function() {
try {
document.querySelectorAll('[data-hook="cashier-payments-method-field-textField-email"]').forEach(function(input) {
if(/\S+@\S+\.\S+/.test(input.value)) {
trackdesk("YOUR_TENANT_ID", "externalCid", {
externalCId: input.value,
revenueOriginId: "YOUR_REVENUE_ORIGIN_ID",
});
}
})
} catch (e) {
console.error(e)
}
})
})
}())
</script>
<!-- Trackdesk help script wix stripe connection end -->
Make sure to replace YOUR_TENANT_ID with your actual Tenant ID based on our article here.
Make sure to replace YOUR_REVENUE_ORIGIN_ID with your actual Revenue origin ID.
How to add a script to Wix as custom code
There’s a guide available on the Wix Support site that explains how to add custom code, such as our script. You can access it here. Make sure to add the scripts only to the places mentioned above.
Testing Your Integration
Please remember to test the creation of clicks and conversions before starting your program. This way you can verify that tracking has been set up correctly. You can create a test click and conversion by following the steps described here.