Added first round of analytics and event tracking BOD-190
This commit is contained in:
@@ -19,6 +19,7 @@ import RenderTemplate, {
|
||||
displayTemplateInWindow,
|
||||
} from "../../utils/RenderTemplate";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
paymentModal: selectPayment,
|
||||
@@ -69,6 +70,8 @@ function InvoiceEnterModalContainer({
|
||||
try {
|
||||
let stripePayment;
|
||||
if (useStripe && bodyshop.stripe_acct_id) {
|
||||
logImEXEvent("payment_stripe_attempt");
|
||||
|
||||
const secretKey = await axios.post("/stripe/payment", {
|
||||
amount: Math.round(values.amount * 100),
|
||||
stripe_acct_id: bodyshop.stripe_acct_id,
|
||||
@@ -94,6 +97,7 @@ function InvoiceEnterModalContainer({
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
logImEXEvent("payment_insert");
|
||||
|
||||
const newPayment = await insertPayment({
|
||||
variables: {
|
||||
@@ -168,15 +172,13 @@ function InvoiceEnterModalContainer({
|
||||
okButtonProps={{
|
||||
loading: loading,
|
||||
}}
|
||||
destroyOnClose
|
||||
>
|
||||
destroyOnClose>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
autoComplete={"off"}
|
||||
form={form}
|
||||
layout="vertical"
|
||||
initialValues={{ jobid: context.jobId }}
|
||||
>
|
||||
layout='vertical'
|
||||
initialValues={{ jobid: context.jobId }}>
|
||||
<PaymentForm form={form} stripeStateArr={stripeStateArr} />
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user