We want to A/B test the effect of different menu bars via Google Analytics. We use Pagefly to build the pages but the menu is still created in the 'navigation' part of Shopify. I was wondering how I can build an A/B test for this. I have looked for a function in the code that pulls the 'main-menu'. My guessing is that I could create another liquid file with the same code, only this one pulls the other menu 'main-menu-optionA'. And then in GA I can redirect 80% to the view of page with 'main-menu' and 20% to the view of page with 'main-menu-optionA'. However I have 2 questions:
Thanks for your help!
Would recommend using a tool like ours at Neat A/B Testing to achieve this.
You will not only be able to test your menu, but, can run a variety of different tests, easily, too. You'll get the reporting and data you need and the ability to scale more tests too.
We would be happy to set up a call to ensure you successfully setup your test up and show you what else is possible.