Videos and Webinars

Add a Snippet of Code Within the Head Tag of My Pages

Some merchants may have special scripting that needs to be placed between the open and closing head tags of their site. For example, 3rd party functions may sometimes provide a specific code that needs to be placed inside the head tags of the pages.

Fortunately, Shift4Shop makes this easy to do:

  1. Log into your Shift4Shop Online Store Manager.

  2. Using the left navigation menu, go to Settings > Design > Themes & Styles.

  3. Look towards the top right of the page and click on the Edit Template (HTML) button.

You will see a listing of the templates used by your store's selected theme. Within the list of templates, you should see one labeled "frame.html"

  1. Click on the frame.html template to open it up in the Template Editor.

  2. Within the HTML coding, look for the closing head tag, which will look like this:

</head>

3. Place the code immediately before the closing </head>.

4. Click Save at the top right of the page to commit your changes.

As an alternative, you can also sometimes use the Google Search Console Verification feature, which also places code within the head tags.

To try this option:

  1. Log into your Shift4Shop Online Store Manager.

  2. Go to Marketing > SEO Tools.

  3. At the top of the page, look for and click on the Google Tools tab.

  4. Scroll down to the "Google Search Console Verification Meta Tag" section.

  5. Add your code there and click Save at the top right of the page.

  6. Next, go to Settings > General > Store Settings.

  7. Once there, click on the General tab at the top

  8. In the "Performance" area, click on Clear Cache.

Although this section of your store manager was intended to verify site ownership on Google Search Console, the placement of the script happens to be the head tags, so it can be useful for other situations as well.