6-0050-EN-Adding custom HTML codes within <body>, <head> sections, or on the front page of the site

Article Details
URL: https://support.shopfactory.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=5241
Article ID: 5241
Created On: 16 Jan 2017 11:37 PM

Answer

ShopFactory has existing dialog boxes that can be used to insert custom HTML codes in your shop.

Case 1) Adding custom HTML code to take effect on the Front page

If you want to the code to take effect only on the front page, then use the existing "Verification Meta-tag" field in Central page - SEO -> Website Analytics -> Verification Meta-tag window.

At the popup window, click on “Website Analytics

 

Case 2) Adding custom HTML code within the <body> tag

If the merchant wants the custom code added within the <body> tag, then edit the website.html file (i.e. adding the Google remarketing code)

The merchant will need to insert the Google remarketing script in the website.html before the </body> closing tag.

Your website.html file can be found in:

<shop folder>\SFXTemplates\Themes\<your current website theme>\Website\parseLang

Where, <shop folder> is the name of your shop

and <your current website theme> is the SFX template you are using, i.e. SFX-BASE-AA

Where, <shop folder> is the name of your shop and <your current website theme> is the SFX template you are using, i.e. SFX-BASE-AA

For example,


<shop folder>\SFXTemplates\Themes\SFX-BASE-AA_1\Website\parseLang

 

Important Notes:

    1. Remove the Google remarketing code if you have added it as a custom html in the shop (via Central -> Custom Website Contents) so that the Google remarketing code in the website.html will work.
    2. Make sure you also turn on Rebuild All from the Settings menu so that all the pages gets rebuilt.

Case 3) If the merchant wants the code added in the <HEAD> tag, then you can simply use the “Google Analytics Code” window again in ShopFactroy Central page (see Case 1. above) -> Search Engine Optimization (SEO) -> Website Analytics -> "Google Analytics code" window. Note: You can add any custom html in this GA code window, where, the custom html code must be added within the <head> section for all pages. So it is not solely just for Google Analytics code. You can add any html code that needs to be added within <HEAD> section.