Using scripts in Apogee StoreFront pages
Apogee StoreFront incorporates an easy to use HTML Editor for formatting the content of the home page and custom pages of a store. This editor has an option to edit the HTML source code. It allows people familiar with HTML, CSS and scripting to fine-tune the layout of pages or add extra functions. The example below shows a small piece of code that is inserted using this mode to add a newsletter subscription form to a page.
Care should be taken when adding scripts to a page, since the code can affect the way a store and even Apogee StoreFront itself function.
- Never add code that automatically redirects a page to another page within the store or elsewhere on the web. Such code will not only redirect the page for store visitors, it may also redirect the page when the administrator tries to access its preview in StoreCenter. So after inserting such code, there is no way it can be modified again. The Apogee StoreFront support team can remove rogue scripts but this is a time consuming process.
- Keep in mind that adding scripts can have legal ramifications. In the European Union, for example, the use of tracking code (such as Google Analytics) is only allowed if store visitors are informed about the presence of the resulting cookie and agree to its use.
- Scripts may have a negative impact on the performance of the Apogee StoreFront service. Always evaluate the potential impact of the code on server performance. If the monitoring tools of the Apogee StoreFront team measure the discernible impact of some external code, they will contact you to work out a solution.