({ amount, duration })
| 19 | } |
| 20 | |
| 21 | function getTrackingData ({ amount, duration }) { |
| 22 | const options = {} |
| 23 | if (amount) { |
| 24 | const numericalAmount = parseInt(amount) |
| 25 | options.purchaseAmount = numericalAmount |
| 26 | options.currency = 'USD' |
| 27 | options.predictedLtv = numericalAmount * getLtvMultiplier(duration) |
| 28 | } |
| 29 | return options |
| 30 | } |
| 31 | |
| 32 | function getLtvMultiplier (duration) { |
| 33 | if (!duration) |
nothing calls this directly
no test coverage detected