Revenue Attribution
Bolt
Set up revenue attribution when using faurya with Bolt AI website builder. Track e-commerce revenue and subscription payments through Stripe integration.
Attribute revenue with Bolt
Make sure you've added faurya tracking to your Bolt application and connected your Stripe account first.
Copy and paste this prompt to Bolt AI to automatically set up revenue attribution:
Prompt for Bolt AI:
I need to add faurya revenue attribution tracking to my Stripe payment integration. I don't know which Stripe method is currently implemented, so please analyze the existing code and implement the appropriate solution.
Here are the 4 possible implementations based on what's currently in the code:
METHOD 1 - If using Stripe Payment Links:
If you find Stripe Payment Links being used, tell me to follow this guide instead: https://datafa.st/docs/stripe-payment-links (this requires configuration in the Stripe dashboard, not code changes)
METHOD 2 - If using Stripe Checkout API (stripe.checkout.sessions.create):
Update the checkout session creation to include faurya visitor tracking metadata:
1. Retrieve 'faurya_visitor_id' and 'faurya_session_id' from request cookies
2. Include them in the Stripe checkout session metadata:
metadata: {
faurya_visitor_id: extractedVisitorId,
faurya_session_id: extractedSessionId
}
See full documentation: https://datafa.st/docs/stripe-checkout-api
METHOD 3 - If using Stripe PaymentIntent API (stripe.paymentIntents.create):
Update PaymentIntent creation to include faurya visitor tracking metadata:
1. Retrieve 'faurya_visitor_id' and 'faurya_session_id' from request cookies
2. Include them in the PaymentIntent metadata:
metadata: {
faurya_visitor_id: extractedVisitorId,
faurya_session_id: extractedSessionId
}
See full documentation: https://datafa.st/docs/stripe-payment-intent-api
METHOD 4 - If using any other Stripe method or unsure:
Implement client-side payment event tracking on the success page:
window.faurya("payment", { email: customerEmail });
Replace 'customerEmail' with the actual customer's email from the completed payment.
See full documentation: https://datafa.st/docs/stripe-other-methods
Please:
1. Analyze the current Stripe payment implementation to determine which method is being used
2. Apply the appropriate solution above
3. Confirm which method you implementedWith revenue attribution configured, your faurya dashboard will provide comprehensive payment analytics with complete visitor attribution.