How can I add the code "<script src="http://socialsharemonkey.com/share.php?u=313&amp;p=166"></script>" before the closing </body> tag in Webflow without getting an error?

TL;DR
  • Access Project Settings in Webflow, navigate to the Custom Code tab, and add your script in the Footer Code section.
  • Save changes and publish your site for the script to take effect.

To add a script to your page in Webflow, you should use the custom code area designated for such content. Here’s how to do it:

1. Access Project Settings

  • Go to Project Settings by clicking on the settings icon (gear) next to your project’s name in the Webflow Dashboard.

2. Open the Custom Code Section

  • Navigate to the Custom Code tab within the Project Settings.

3. Add Code to Footer Section

  • Scroll down to the Footer Code area.
  • Paste your script code (<script src="http://socialsharemonkey.com/share.php?u=313&amp;p=166"></script>) into this box.
  • The Footer Code is designed to inject scripts right before the closing </body> tag.

4. Save Changes

  • Click Save Changes at the bottom of the page to ensure your script is stored.

5. Publish Your Site

  • Publish your site for the changes to take effect on the live URL.

Summary

To add a script in Webflow, paste it into the Footer Code section under Project Settings > Custom Code. This ensures the script is added before the </body> tag without causing errors. After adding, remember to publish your site.

Rate this answer

Other Webflow Questions