How to Add Chat-Like Add on Scripts

Tutorial

There are some chat scripts or other add on scripts that may require their code to be added to the head of the page. There are a couple of options available within your MemberGate site to allow you to either add the chat script to all of the pages of your site, or to select which specific pages that should run the script.

*NOTE - This is not all encompassing as not every single add on script will have the same instructions for use. The guidelines found below are for scripts which include instructions on adding their code to the 'head' of the page.

The instructions below include information on adding the script as a custom script (this is a good idea to do first). If you would like to add the script to run on all of the pages, see the 'Add to All Pages' section, or if you'd like to choose which pages should run the script, see the section on 'Add to Specific Pages'

 

Click on each tab for more information

Do this First: Add as a Custom Script

Click on each section to expand for more information

The Add/Edit Custom Script tool can be found under > Tools > Add/Edit Custom Script

The Add/Edit Custom Script tool can be found under Tools Add/Edit Custom Script

Choose 'Add New Custom Script'

Choose 'Add New Custom Script' from the drop down menu and click the button.

Custom Script Settings

Custom Script Settings

Custom Script

Custom Script Name

Enter a name for the custom script. This name will not be shown anywhere on the live site. It is an identifier so you can find it in the drop down menu and edit it in the future.

Custom Script

Add the Script to the 'Custom Script' field. This code doesn't necessarily only have to be a script, it can also be html code, css code, plain text, etc. 

Custom Script Status

Set the status of the custom script to 'active' if this section should be shown on your pages. Set the status to 'inactive' to disable the script from showing on your pages.

Click the 'Add This Custom Script' button

Click the button

Copy the CF tag and paste it where you would like the custom script to appear

Add the Custom Script to a Page

After the custom script has been saved, a preview screen with the script will appear.

The CF Tag will appear in the box below the preview. Copy the cftag and paste it into the content box for a page, department or portal page.

Script

Option A: Adding the Script to All Pages

Adding the script to all pages provides you with a really simple way to add a script to your site. It is only required to add the script in one spot, and it will automatically be added to all of your pages. Further customization or editing is not necessary.

For example, if you were running a chat script, the chat box can be added to every page by pasting the custom script cf tag in one box.

The custom script can be added to the 'Javascript to include on all Pages' box found in 'Edit Site Descriptions'

From the control panel click on the cog icon on the top right to open the right sidebar.

The custom script can be added under Master Settings Edit Site Descriptions

Javascript to include on all pages

The 'Javascript to include on all pages' box can be found in the 'Scripts' section.

Paste the custom script into the 'Javascript to include on all pages' box.

Save

Click on the button.

Option B: Running the Script on Specific Pages

Adding the script to specific pages provides you with greater flexibility and allows you to choose which specific pages that you would like the script to run on.

For example, if you were running a chat script, you could select to just run the chat box on the subscription form page, the sales page and the contact us page.

The custom script can be added to the 'Public Banner Script' boxes found in 'Edit Site Descriptions'

From the control panel click on the cog icon on the top right to open the right sidebar.

The custom script can be added under Master Settings Edit Site Descriptions

Top and Bottom Scripts

The 'Top and Bottom Scripts' boxes can be found in the 'Scripts' section.

Paste the custom script into the appropriate 'Top and Bottom Scripts' boxes depending if you'd like to run the scripts on public and/or members pages.

Save

Click on the button.

Enable the Pages to Run the Script

The Banner Ad Scripts can then be manually enabled on the specific pages that you would like to run the script.

When adding or editing content and department pages there is a field called 'Show Banner Ads'. Select the specific 'Show Ads' options from the drop down menu to run the script on that page.