What is a revenue conversion?
The intended purpose of a revenue conversion is to track when someone completes at least one purchase. By this definition, it is a single conversion event marking a user as someone who did check out. You can set up custom goals to determine if order value is above a certain threshold, order includes multiple products...etc.
However, what is tracked in Compose for revenue will depend on when and how you fire the revenue event. The above definition is our recommended/intended definition.
Setting up revenue tracking
Note: If you are on Shopify, scroll to the next section.
First, you will need to install the Compose script on your site via the code snippet found in project settings. Learn more
Getting your revenue data will depend on how your store or platform works. The Compose script includes global methods allowing you to use the `dispatchEvent` method to fire a `revenue` event.
Learn more about Compose dispatchEvent here.
window.compose.dispatchEvent(
new CustomEvent('goal:revenue', {
detail: {
value: 45.0,
currency: 'USD', // Required, but can be any ISO 4217 currency code.
},
})
);
Once configured in your project, you will start seeing `revenue` and `total revenue` conversion data in your tests.
Revenue: The value purchased by a tested user.
Total Revenue: The value purchased when a tested user returns to purchase more.
Ex: A single visitor checked out with $45, came back and checked out again with $55. This would be only 1 revenue conversion (by the first $45 purchase) while the total revenue would be $100.
ISO 4217: You can learn more about these codes here.
Note: Our data ingestion validation is very strict. If any fields do not match our validation, the event will be thrown out.
Cross Domain Tracking: This is critical to turn on for stores who have a different subdomain for checkout. You can enable this in your Project Settings.
Ex: Your primary website is www.mysite.com but the checkout is on shop.mysite.com
Make sure your domain setting excludes subdomains (meaning remove `www` as well)
Ex: https://yourawesomesite.com
Setting up revenue tracking with Shopify
If you are utilizing the Compose Shopify App, revenue tracking is on by default. Otherwise using manual script placements will also allow you to track revenue. You can see more info here.
Still need help?
We offer a free onboarding session after sign-up, and we are happy to assist with getting the snippet installed and revenue tracking functioning on your site. You will have a link to schedule an onboarding call in your welcome email, or you can contact support to request one.