Knowledgebase: Site Design

Is it possible to 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 hand 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:
  1. Place the code immediately before the closing </head>
  2. Click "Save" at the top right of the page to commit your changes.

It's usually best to add your 3rd party coding directly before the closing </head> tag to prevent it from interfering with existing Shift4Shop coding. Also, the code is easier to find should you need to revert.

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 usefuly for other situations as well.

Help Desk Software by Kayako fusion