Last active
May 19, 2025 14:31
-
-
Save mthsaguiar/06a441d1a71ca88ab4ac41c85e4c5f5b to your computer and use it in GitHub Desktop.
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
| function runABTest() { | |
| const checkoutBtn = document.querySelector('.cart-drawer-button-checkout') | |
| if (window.innerWidth < 768) { | |
| if(checkoutBtn) { | |
| checkoutBtn.addEventListener('click', function() { | |
| //tracking code here... | |
| }) | |
| } | |
| } | |
| } | |
| document.addEventListener('DOMContentLoaded' () => { | |
| runABTest() | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment