Need help copy pasting 2 lines of code into SilverStripe :)

Framework: 3.6.2, CMS: 2.6.2:

Need assistance with copying code into my company’s website via the SilverStripe CMS :

I am trying to set up a widget that puts my company’s Google reviews on our website using a widget from a company called Review Trackers.

The site gave me a link to the widget. I am supposed to copy paste these lines of code but I don’t know where to place them on my company’s website, which is on SilverStripe.

I was able to find an “additional code” section under the settings tab on Silver Stripe. Maybe the code goes there? I was not able to find another section for inserting code, but I am not a web developer or a SilverStripe expert. Please help in any way you can. I would very much appreciate it!!

That ‘Additional Code’ tab is non-standard but could work. Try pasting the second part (the script tag) in to the footer code section, which I’m guessing will load the script in every page. That’s not ideal but should get the job done. You will still need to add the first part (div tag) to any pages where you want the widget to appear.

To do this in the CMS open the page you want to add it to, then in the Content area click the HTML markup button (it’s a small button that just says HTML) and paste in that code where you want it to appear. Hopefully that will work, but sometimes tags like these get messed up or stripped out when you try to add them through the CMS.

The better approach would probably be to have a developer add these code snippets to your project code and templates rather than trying to do it in the CMS.

Thanks @JonoM! I also found an “additional code” section for the home page, which is the place where I would want to add the code. Would that be a better place to add the code than the “additional code” section under settings? Unfortunately, talking to our developer is not an option at this point.

Thank you so much!!

You can certainly give it a try! If it doesn’t work or isn’t where you want it to be then you can always revert your changes in the CMS.