Appearance
Best Practices for Tracking Revenue
The Revenue page allows you to gain insight into the efficiency of Relewise's recommendations, and is a useful tool for understanding how to get the most out of your Relewise integration. However, in order to use it, a few best practices must be followed, to ensure that the data you get is correct.
Revenue tracking requires a few key elements, namely:
- tracking the event chain
- maintaining consistent User IDs
- proper order data.
With these three implemented, you will be able to use Relewise's Revenue page for its intended purpose of giving you insight into Relewise's effectiveness on your site.
Tracking the Event Chain
Relewise considers it a conversion when our engine is able to identify the following sequence of events:
- A product is viewed (Product View Tracking)
- The product is added to cart (Cart Tracking)
- The product is tracked in an order (Order Tracking)
These steps must all be tracked for the same product ID and with the same User ID in order for the tracking to be registered as non-anonymous revenue.
Product View tracking should happen on the PDP when it loads. Ideally this should contain both product ID and variant ID where applicable. Aside from assisting with revenue tracking, the product view tracking event also affects the underlying calculations on popularity and relevance for both search and recommendation logic. This makes it a hugely important step to accomplish.
Cart Tracking should happen when the product is added to the cart, typically as part of the Power Step. Cart tracking also helps inform the Relewise engine of the user's interest, which can help steer the user towards relevant products in further searches and recommendations.
Order Tracking should happen at the confirmation step of your checkout flow, when payment has been confirmed and the order is securely stored in your order handling system. While Product View and Cart Tracking only require product and variant IDs, the order tracking request is where the actual value of the revenue is stored - and so it contains a few additional pieces of information to be considered. We discuss this below.
Maintaining Consistent User IDs
Key to proper revenue tracking is maintaining consistent user IDs. Relewise operates with two different kinds of non-anonymous users: Temporary, and Authenticated.
It is important to keep these user IDs consistent across the various Relewise API requests you make. A common mistake is to either use an incorrect user ID in the order tracking request (such as importing an internal user ID from your CMS), or neglecting to specify a user ID entirely. We strongly urge you to thoroughly test the order tracking implementation, to ensure that all intended types of user IDs are being tracked correctly.
Temporary User IDs
A Temporary User is one which has accepted your cookies, but who is not using a registered account. For non-B2B use cases, this will account for most of your identified users. In order to properly track your temporary users, you must make sure that you have consent according to existing GDPR rules, and the user ID is typically generated by your cookie consent provider upon acceptance of your cookies. In your Product View Tracking, you should therefore input the ID provided into the temporaryId field.
A Temporary User ID persists as long as the cookie remains on the user's device. This allows the user to leave the session and return later, and still find that Relewise 'remembers' their activity. A temporary ID is the minimum level of identification necessary to track non-anonymous revenue, and is used in heaps of other Relewise services as well, including search analytics - so we strongly recommend that you make it a priority!
Authenticated User IDs
An Authenticated User is a user who has logged in to your service, and thus provided a stable, recognizable identifier. Typically, this will be in the form of a user ID in your CMS, which can be sent back to Relewise, but it can also be something like an email address. The key is that it is a static value that does not change with the removal of a cookie, and which persists should the user log in with the same user on separate devices.
Authenticated users are not subject to the same scrutiny as temporary users are in terms of GDPR, since it is implicit in the providing of personally identifiable information that the user consents to your handling of said data. In short, you cannot tell someone your email address and still remain anonymous. As such, even a user who has declined tracking cookies may be tracked as an authenticated user, provided they log in to your site using a secure password. This does not mean that you are granted permission to store cookies on their device, it simply means that you may use the identifiable user ID within a Relewise context, such as for tracking, search, recommendations etc.
Ensuring Proper Order Data
While Product View Tracking and Cart Tracking both require just the product ID (and optionally variant ID), the Order Tracking itself requires a few more details in order to be effective. These are, in order:
- User ID (as discussed above)
- Subtotal, including a valid currency. Subtotal here refers to the total order amount in the specified currency.
- Line Items, which account for the individual product IDs (and variant IDs) in the order, and the amount of each product sold.
The User ID helps Relewise connect the purchase behavior to the previously tracked events, and allows us to understand that a conversion has happened. It is therefore vital that you ensure that the User ID used in the order tracking is the same as the ID used on other parts of the site. If you use a different user ID, the order will still be tracked as non-anonymous revenue, but it will be impossible for Relewise to reflect whether our recommendation or search algorithms helped guide the user towards a conversion - which in turn means that you won't get accurate insight into Relewise's performance.
Including the Subtotal ensures that Relewise has numbers to work with. Please note that Relewise is not intended to be a system for creating economic reports, and the numbers tracked to Relewise cannot be guaranteed to be reflective of the true revenue of your business. As such, the numbers provided to Relewise (and the Revenue page itself) are meant to provide overall insight into the efficiency of Relewise to drive conversions on your site, and not as an economic reporting tool to balance your budget on.
The Line Items account for the tracking of the actual products that have been sold, and assist in providing the data for things like popularity for search sorting, recommendation algorithms, etc.