When you need it
Almost everything is done with elements and settings. Custom code helps when you need to:
- embed a third-party widget (a calculator, online booking, reviews from another platform);
- add an effect the settings don't have;
- connect your own counter or script.
Code in one spot of the page
The «Custom code» element (“Add” → «Elements» → «Other») puts HTML, CSS and scripts right in that spot of the page. You write it in an editor with highlighting, «Format» lays it out over lines, and a large window helps with long code.
Scripts don't run in the editor or the preview, so nothing gets in the way of your work. Check the result on the published site.
Code for the whole site
The gear at the top → «Custom code»:
- CSS: styles for the whole site, say your own font or spacing fixes;
- head: code at the start of every page (service verifications, counters);
- body: code at the end of every page (chat widgets and the like).
Important
- Scripts run only on your site, in visitors' browsers. Check code you copy from elsewhere: it acts on behalf of your site.
- Facebook, TikTok, Google Ads pixels and GTM are better connected in the site's settings than with code: then server events, Tersby's reports and the GDPR cookie banner work.
- Take leads with a Tersby form: it sends them to the cabinet, Telegram, the CRM and the pixels. A home-made form in code can't do that.
- If something breaks, delete the element or the code and publish: earlier versions of the site are in the history.