AB Split Test setup for UABB Modal Automatic pop-ups
As of version 1.0.3, you can use this guide to selectively trigger UABB modals, when it’s AB test variation is displayed.
Watch the below video for steps, and the code needed is below that.
Any questions, hit us up on chat and we’ll give you a hand.
How To Video
Code you’ll need
Modal trigger Class and/or ID
Found at Modal > Display Settings > Display Modal On (Custom Class / ID) > Custom Class and/or ID
.ab-split-test-trigger
HTML MODULE CONTENT
<!-- AB SPLIT TEST SCRIPT TO TRIGGER MODAL AUTOMATICALLY, WHEN THIS VARIATION IS DISPLAYED --> <!-- SEE KNOWLEDGEBASE FOR MORE --> <!-- /documentation/article/45-ab-split-test-setup-for-uabb-modal-automatic-pop-ups --> <!-- NOTE, SET UP THE AB TEST ON THIS HTML MODULE, NOT THE UABB MODAL MODULE. Go to Advanced > AB Split Test --> <div class="ab-split-test-trigger"></div> <script> jQuery(document).ready(function(){ jQuery('body').bind('ab-test-setup-complete', function() { // if the empty div we created above is visible, then AB test has displayed it, so we should trigger the modal. jQuery('.ab-split-test-trigger:visible').click(); }); }); </script>
Things to note / troubleshooting
- This is only for UABB AUTOMATIC pop ups. If your modals are triggered in another way, then you can ignore this article.
- Do not apply an AB test to the modal itself. You want to AB test on the HTML modulethat is controlling the modal.
- After you paste in the code, go to the HTML modules Advanced tab, then scroll to AB test section and tag the test as usual.
- This only works as of version 1.0.3 – released 17 June 2020.