Skip to main content
Skip table of contents

How do I add Surfly's co-browsing to my website?

If you want to be able to start co-browsing directly from your website, you have to add the Surfly snippet to each page you want to be able to start a session from. If you have access to the code, you can add the below script right above the closing </body> tag of your HTML.

If you use a website builder, you probably have an option there where you can add code to your web pages.

You can also use a Tag Manager to add the Surfly snippet to your website.


var settings = {
// Surfly session options can be set here, or at the Company/Plan levels.
widget_key: '656bad009e114ca49b13b1c2960693d4',
require_password: false,

Surfly.init(settings, function(initResult) {
    if (initResult.success) {
        // API calls can now be made!
        if (!Surfly.isInsideSession) {
        console.log("Surfly was unable to initialize properly.")

Should I put the Surfly snippet on every page of my website? Read here >>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.