1/* Works with default theme. Override in your own theme to adapt and extend. */ 2const plausibleGoals = { 3 /* Default goal, send event with optional params */ 4 run: function(event, params) { 5 plausible(event, params); 6 }, 7 8 /* Checkout goal, allows to send the current step */ 9 checkout: function(event, params) { 10 current(); 11 12 const continueButtons = document.getElementsByClassName('continue'); 13 for (let i = 0; i < continueButtons.length; i++) { 14 continueButtons[i].addEventListener('click', function () { 15 current(); 16 }); 17 } 18 19 function current() { 20 const steps = document.getElementsByClassName('checkout-step'); 21 for (let i = 0; i < steps.length; i++) { 22 if (steps[i].classList.contains('-current')) { 23 plausible(event + '-' + (i + 1), params); 24 } 25 } 26 } 27 }, 28}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.