Saturday, July 13, 2019

Insert HTML Code or Script Directly after the Opening <body> Tag of the Web Store Theme

There are 3rd Party Tracking Scripts which require the script/code to be placed right below the opening BODY tag of the Web Store Theme.

Currently, there is no out-of-the-box way to add scripts directly after the BODY tag, as there are system-generated codes added by NetSuite along with the contents of the fields on the Web Store Theme.

This is possible though through an Alternate Solution of using comment tags in the Addition to <head> and body tag attributes field on the Web Store Theme to add the scripts/codes.

To implement this alternate solution follow these steps:

1. Navigate to Setup > Site Builder > Themes. Edit the theme used for the Web Store. To know which theme is currently assigned, navigate to Setup > Site Builder > Set Up Web Site > Appearance tab > Web Site Theme.

2. Click the General tab.

3. On the <BODY> TAG ATTRIBUTES add this at the last tag in the contents in the field: onload-page_init()>, and add the scripts/codes after this.

4. Finally, insert a comment tag at the end of the field with 4 dashes:

Check the image below for reference:

1 comment:


  1. notepad++ download mac

    Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.

    ReplyDelete