Switching themes is often a core part of the theme management workflow for Shopify stores. Currently, theme switching is partially supported, and we plan to provide more support in the near future.
If you are running an active test and switch themes, then as long as the tested templates continue to be available in your new theme, the test will be unaffected and continue to run.
Occasionally, tests will be drafted and test 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 a new theme is published and does not include the templates required for an active test, the test will be ended immediately.
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).
To ensure a seamless testing experience, we are working on a solution to auto-migrate tested templates to your new theme if they are not detected, so that your active tests can stay active in the event a new theme is published.
We suggest that if you change your theme often, you plan your testing strategy around this workflow so as to not interrupt testing.