💳Track Sales (Stripe)
When using the Stripe integration, it is expected that you add the user's email when calling the signup script.
This way, the provided email is directly being matched with your Stripe records.
<script type="text/javascript">
await Uppercut.signup(email='[email protected]', userId="1234")
</script>No other action is required, although you can take additional optional steps to make your tracking more robust.
Pre-set Stripe Customer Email
If you're using email-based tracking, it is recommended that you set the customer_email record when starting your Stripe checkout to warrant data consistency.
const session = await stripe.checkout.sessions.create({
customer_email: '[email protected]',
line_items: [
.....
],
mode: 'subscription',
success_url: '....'
});stripe.checkout.Session.create(
customer_email="[email protected]",
line_items=[....],
mode="subscriptions",
success_url="...."
)Stripe::Checkout::Session.create({
success_url: '...',
line_items: [....],
mode: 'subscription',
customer_email: '[email protected]'
})Use ID-based tracking
Email-based tracking can have several downsides, such as privacy concerns and data inconsistencies when emails are being changed.
You can set the user's ID and use it as a more robust form of tracking. You have two options to do so.
Pass user ID in Stripe checkout
Manually add user ID to Stripe customer
Last updated