For some reason my post is not showing in the forum, might be the link I included to a plugin.
I don’t work for them it’s not an ad, it just helps with development best practices.
The advantage of the plugin:
• It allows you to switch themes, for troubleshooting or upgrading
• It allows you to run scripts in front end, back end or both
• Easily turn scripts on and off for troubleshooting or when running special promotions