Tracking Stages
Dreamdata Analytics allows you to track various stages, such as orders, subscriptions, or other meaningful steps in your user's journey.
Example Usage
Consider a website where one can purchase a one-year membership. You can then track it using the following call
window.dreamdata.trackStage({
stageId: "abcd-123",
stageName: "1-year membership",
stageValue: 300,
email: "joe@company.com",
});
If the stage details change, reuse the stageId
with the updated values. For
example, if the order is canceled, set stageValue
to 0:
window.dreamdata.trackStage({
stageId: "abcd-123",
stageName: "1-year membership",
stageValue: 0,
email: "joe@company.com",
});
It is important to include the user's email address when tracking stages, as it is used to associate the purchase with the correct account.
Specifying Currency
The default currency is configured in your account settings. However, you can
override this by explicitly specifying the currency
field:
window.dreamdata.trackStage({
currency: "EUR",
stageId: "my-stage-id",
stageName: "",
stageValue: 30,
email: "joe@company.com",
});
Ensure the specified currency conforms to the ISO 4217 standard (e.g., USD, EUR, GBP) and is supported in our app. You can see supported currencies on your account settings page.