You can do this with Theme Scientist, the Shopify A/B testing app.
Here's how that would work:
1) Duplicate your live theme (your live theme will be Theme A)
2) Make the changes to the product template on the new theme (this will be Theme B)
3) Start a Theme Test in the app. It will automatically swap those themes and track the stats, so you can compare which performs better.
Best practices vary depending on the store and goals, but in general I like this for Shopify sites:
- Run a test for at least 2 weeks and aim for 95%+ statistical significance (you can calculate significance with a calculator like this: https://speedboostr.com/ab-test-calculator... or the app I recommend has it built in).
- Swap themes every night at midnight to minimize the possibility of a user seeing a different theme during their browsing session. With Shopify, you don't have access to the server so doing split-traffic testing like you would on your own website is not really feasible (doable, but results in performance slowdowns because of rendering the page variation on the front end).
- Always be testing. I've been doing A/B testing for a few years and what happens is that some tests don't provide any differences, while some can provide significant improvements in conversion rate or actions taken. The key is to always be testing something, then when that test is complete, choose the winner and start the next test.
My team developed that app I mentioned, so if you need any help just contact us through the app listing: https://apps.shopify.com/theme-scientist
This can be quite tricky. Would recommend using an app to assist with doing this.
Would recommend Neat A/B
If you need any support once installed on getting this successfully launched as you would like please reach out to us as we are always helping merchants run successful experiments!