Skip to main content
All CollectionsWorkspacesAdmin
Adding Custom Code to a Workspace
Adding Custom Code to a Workspace

How to add a custom code on the workspace or template level

Updated over a week ago

Overview

Dock allows you to add a custom code embed on the overall workspace or template level. With this feature, you can add custom javascript that runs on the workspace globally. This enables things like Google Analytics, and most support chat widgets such as Intercom.

In the guide below, we'll walk through how to configure this globally (on the template level) and also on the workspace-specific level.


Custom Code on the Template Level

Step 1: Navigate to the Templates section from your home screen (on the left-hand nav bar).

Step 2: Click on the appropriate template.

Step 3: Select Settings next to "Edit template."

Step 4: Under "Advanced Settings" select Add custom code.

There are two sections for custom codes. Make sure you save each individual section with the Save button, when complete.

By adding the custom code to the template level, it will automatically be applied to every workspace created from that template!

Custom Code on the Workspace Level

Instead of applying the custom code to an entire template, you can instead add a custom code to one workspace, in particular. This allows you to add something specific to that environment only, and will not have an impact on other client spaces.

Step 1: From the homepage, navigate to the workspace in question.

Step 2: On the Internal tab, click Settings found on the top left.

Step 3: On the righthand side, under "Advanced Features" select Add custom code.

Step 4: Add in the custom code header and footer, and remember to Save!

To learn more about adding Intercom in particular, check out this article.

Did this answer your question?