Merge pull request #7900 from crookedneighbor/analytics_fix

Analytics fix
This commit is contained in:
Blade Barringer
2016-08-15 22:39:03 -05:00
committed by GitHub
5 changed files with 282 additions and 163 deletions
@@ -131,7 +131,11 @@ api.checkout = {
// execute payment
let method = 'buyGems';
let data = { user, paymentMethod: 'Amazon Payments' };
let data = {
user,
paymentMethod: 'Amazon Payments',
headers: req.headers,
};
if (gift) {
if (gift.type === 'subscription') method = 'createSubscription';
@@ -247,6 +251,7 @@ api.subscribeCancel = {
user,
nextBill: moment(user.purchased.plan.lastBillingDate).add({ days: subscriptionLength }),
paymentMethod: 'Amazon Payments',
headers: req.headers,
});
if (req.query.noRedirect) {