-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkout steps for the Checkout Behavior report in Google Analytics from digitaldarts.com.au/analytics
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Online Store/preferences/google analytics/funnel-reports.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 }); | ||
}; |