What are workspace scripts?
This section of the application allows you to add code snippets that you want to apply to multiple pages in the workspace at the same time. To learn more about the difference between an account and a workspace, please refer to this guide.
It is up to you what you choose to add in this section, depending on your goals for your landing pages.
You can choose to add the scripts to all past and future pages at once or to manually enable which pages they should be on. These options are explained in more detail below.
NOTE: This feature is only available for some of our subscriptions. If that is the case, you will see an upgrade prompt when attempting to access it. More information about our currently available subscriptions can be found here: https://instapage.com/plans
How do I use workspace scripts?
In order to add, edit or remove workspace scripts, click on the name of the company in the upper-left, then click on Settings. This will open the menu that includes all workspace-level settings. Click on Scripts.
As long as the syntax is correct, the editor will dynamically change the colors of the text to help you visualize the different components. If the syntax is incorrect, the text will be black. You can use this to look for missing semicolons, accolades, tags, and so on.
Make sure you hit APPLY in order for the changes to be applied before navigating away from this part of the application.
NOTE: The global scripts added to the whole workspace must be tailored to work for the Thor rendering engine. Click here to learn more.
Selecting how the scripts placed in this section will be applied to the pages / experiences in the workspace
Above the code editor, you can see these options:
You can select either A, B, or B+C.
A - The scripts will be applied to all the past and future pages inside the current workspace, without the ability to deselect individual pages.
B without C - The scripts will not be automatically applied to any pages. A toggle within the Scripts & Privacy section of each landing page will allow you to turn the script ON.
B and C - The scripts will be automatically applied to all the past and future pages inside the workspace. A toggle within the Scripts & Privacy section of each landing page will allow you to turn the script OFF.
Where can I manually enable or disable the global script for a single landing page?
In the Landing Pages tab, click on the name of the desired page, then click on Script & Privacy. Scroll to the bottom and you will see this.
If you chose option A from above, Enable the script for all pages, then the toggle will be greyed out.
Which scripts will load first on a page?
The workspace scripts will load on the live URL of a page first, then the ones placed inside the builder or in the slideout will. They do work together, so the function of a workspace script can be enriched by a page-level script if they are written to do that.