1 min read
Preferences
Online Store → Preferences holds the store-wide settings for your site: the home page title and meta description, a social sharing image, Password protection (useful before launch), the cookie banner and your Google Analytics 4, Google Tag Manager and Meta pixel IDs.
Custom HTML tags in Tag Manager. Your store only runs scripts it trusts, to keep shoppers safe. Tags that load a script file work as they are. A Custom HTML tag with code written inside it needs one extra step in Tag Manager, once:
- In Tag Manager, open Variables → New and choose DOM Element.
- Set Selection Method to CSS Selector, Element Selector to
script[nonce]and Attribute Name tononce. Name the variablenonceand save. - In each Custom HTML tag, change
<script>to<script nonce="{{nonce}}">, then publish your container.
Google explains the same steps in Using Google Tag Manager with a Content Security Policy .
Tip. Before a big sale, Duplicate your Live theme, make the sale changes on the copy, and Publish it on the morning of the sale. After the sale, publish your old theme again. Nothing is lost, because Unpublished themes stay in the library.