Skip to main content

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,
});

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,
});

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,
});

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.