-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathfunnel-reports.js
27 lines (27 loc) · 906 Bytes
/
funnel-reports.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Checkout steps for the Checkout Behavior report in Google Analytics from digitaldarts.com.au/analytics
var ShopifyCheckoutstep = Shopify.Checkout.step;
switch (ShopifyCheckoutstep) {
case "contact_information":
ga("require", "ec");
ga("ec:setAction", "checkout", {
"step": 1,
"option": "contact_information"
});
ga('send', 'event', 'checkout', 'contact information', { nonInteraction: true });
break;
case "shipping_method":
ga("require", "ec");
ga("ec:setAction", "checkout", {
"step": 2,
"option": "shipping_method"
});
ga('send', 'event', 'checkout', 'shipping method', { nonInteraction: true });
break;
case "payment_method":
ga("require", "ec");
ga("ec:setAction", "checkout", {
"step": 3,
"option": "payment_method"
});
ga('send', 'event', 'checkout', 'payment', { nonInteraction: true });
};