If you get the “unrecognized tag...” Smarty error after adding a JavaScript code (for example, a tracking code) to a template, the inserted JavaScript code most likely contains the { and } tags. Smarty uses { and } as delimiters and attempts to interpret the JavaScript code in the template that way.
To avoid the error, complete the following steps:
Open the template to which you have added the code.
Enclose the JavaScript code in a {literal}...{/literal}
container to prevent Smarty from parsing it:
{literal}
your JavaScript code
{/literal}
Save the file.
Questions & Feedback
Have any questions that weren't answered here? Need help with solving a problem in your online store? Want to report a bug in our software? Find out how to contact us.