Switching Themes
Can I change my theme during a live template test?
Yes! You can change your active theme while your tests are live, as switching themes is often a core part of the theme management workflow for Shopify stores. That being said, you need to ensure that templates are consistent across your themes.
If you change your theme often, we suggest that you plan your testing strategy around this workflow as not to interrupt testing.
Make sure your templates are consistent
In order to run template tests, both the original and variant templates must be present in your active theme.
If you are running an active test and switch themes, the test will not be affected if the original and variant templates are included in your new theme. So, if you switch from one theme to a new theme via the Shopify Admin, or from one version of a theme to a new version via Github, make sure that your tested templates are included in the new theme.
Occasionally, tests will be drafted and templates will be created after a branch for a new theme has been created. In this case, there is potential for the new theme to exclude any templates created for the currently active test when the theme is published.
If you publish a new theme and one or more tested templates are not present in your live theme, then Shoplift will proactively pause your test to ensure that store visitors are not being redirected to a variant that does not exist. If your test is paused because a template is not present in your live theme, simply add the template from your previous theme to your new theme to resume your test.
Make sure you have all required files
If you often switch or deploy new versions of your live theme, ensure that any theme files created by Shoplift are present in your new theme:
theme.liquid tracking script: make sure that the Shoplift tracking script is maintained in your theme.liquid file directly after the opening <head> tag
shoplift.liquid tracking snippet: make sure that in the /snippets directory in your new theme, you have the shoplift.liquid tracking snippet included
shoplift.css Brand Styles asset: if you use Brand Styles and Lift Assist™ theme sections for testing, then ensure that your Brand Styles CSS file persists in your new theme
"sl" prefixed sections and snippets: if you use Lift Assist™ theme sections for testing or on your live website, then ensure that your new theme includes any section and snippet files with the file prefix of "sl" (like "sl-image-hero", for example).
Last updated