mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
fix(analytics): drop cap and Stripe platform fixes
This commit is contained in:
@@ -251,6 +251,11 @@ function _sendDataToGoogle (eventType, data) {
|
||||
function _sendPurchaseDataToAmplitude (data) {
|
||||
const amplitudeData = _formatDataForAmplitude(data);
|
||||
|
||||
// Stripe transactions come via webhook. We can log these as Web events
|
||||
if (data.paymentMethod === 'Stripe' && amplitudeData.platform === 'Unknown') {
|
||||
amplitudeData.platform = 'Web';
|
||||
}
|
||||
|
||||
amplitudeData.event_type = 'purchase';
|
||||
amplitudeData.revenue = data.purchaseValue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user