Hi, how can I add a javascript to the website's &l...
# suitecommerce
e
Hi, how can I add a javascript to the website's <head> tags for SCS? I found this field on the website setup record but it doesn't seem to work 😅 I also know we can add script to "Add to <head>" via SMT enhance page but I think it only adds it to the individual page's <head> tags and not to the general website's
s
The field in the WSR does not work on SuiteCommerce (only Site Builder). The SMTs is the correct place but you need to add it to something on every page, such as the header or footer
e
@Steve Goldberg could it be possible to add in the future a label like (Site Builder Only) on those fields? Sometimes is hard to know if the fields are legacy.
s
It’s certainly possible but I don’t think it’s something that will get prioritised soon
e
I see, that would be great. To be honest, this is something that should have been done since SuiteCommerce started as a new product. Hopefully we will see that some day haha netsuite
🙃 1
e
Thanks for the input, @Steve Goldberg! My concern with the SMT approach is that we have to add it to pages individually. While it may work for some use cases, for this one we are trying to add a tracking script for the entire website so we don't want to maintain the script in a lot of places. Is there another way to add the script only in one place and it appears for all pages? • I'm thinking of adding the script as a CMS HTML content with global scope but not sure if this has any negative impacts 😅
s
I'm thinking of adding the script as a CMS HTML content with global scope but not sure if this has any negative impacts 😅
Yes, that is what I meant. Add an HTML block to either the header or the footer section of a page and as long as it is global scope, you'll be fine
✅ 1
e
got it, thanks Steve!