MediaWiki:DonationForm.js: Difference between revisions
Content deleted Content added
new buildUtmSource method to replace addAnalytics |
remove addAnalytics method, move tracking inside redirectPayment |
||
Line 574:
// WorldPay override for cc
if ( paymentMethod === 'cc-wp' ) {
paymentMethod = 'cc';
form.payment_method.value = 'cc';
Line 599:
form.payment_method.value = paymentMethod;
form.payment_submethod.value = paymentSubMethod;
var full_dotted_payment_method = paymentMethod;
Line 610 ⟶ 608:
}
form.
form.utm_source.value = donationForm.buildUtmSource() + '.' + full_dotted_payment_method;
form.utm_key.value = mw.util.getParamValue( 'utm_key' );
form.method =
form.submit();
}
Line 619 ⟶ 620:
};
/**
* Build a utm_source value, including the landing page info.
*
* Note this doesn't include payment method, that's added in redirectPayment method
*
* @return {string} utm_source
*/
Line 648 ⟶ 649:
}
▲ form.utm_campaign.value = getQuerystring( 'utm_campaign' );
/* Return amount selected or input */
|