Created
January 23, 2018 15:15
-
-
Save leobossmann/552ed8532fdc6ed04c0d0cd0431d10dd to your computer and use it in GitHub Desktop.
//Start of Checkout Steps for ee labelling originally by Rob Edlin, https://ecommerce.shopify.com/c/shopify-discussion/t/checkout-labelling-417229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var step_number = 0; | |
switch (Shopify.Checkout.step) { | |
case "contact_information": | |
step_number = 1; | |
break; | |
case "shipping_method": | |
step_number = 2; | |
break; | |
case "payment_method": | |
step_number = 3; | |
break; | |
case "review": | |
step_number = 4; | |
} | |
if(step_number > 0) { | |
ga("require", "ec"); | |
ga("ec:setAction", "checkout", { | |
"step": step_number, | |
}); | |
ga('send', 'event', 'Checkout', 'Option'); | |
} | |
//End of Checkout Steps for ee labelling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment