JavaScript Insertions
✨Available for Premium tier
The JavaScript Insertions pages allow you to add JavaScript to your eCommerce Shop and Web Office. Custom JavaScript should be written using AngularJS (version 1).
This feature's typical use is adding a third-party chat/support widget or Google Analytics. You can insert any valid JavaScript to provide a wide range of custom functionality, such as overriding the system CSS.
📘Note
See the DirectScale Marketplace to find provider apps, integrations, and expert consults.
Finding the Page
In eCommerce Admin, navigate to: Advanced Customization > Javascript Insertion.
{client_ID}.retailadmin.directscale.com/#/Insertion
In Web Office Admin, navigate to: Code Customization > Javascript Insertions.
{client_ID}.admin.directscale.com/#/Insertions
Adding Custom JavaScript
Add custom JavaScript syntax to your eCommerce Shop.
⚠️Important
If your third-party service has given you a script to copy and paste, only copy in the JavaScript portion (don't copy/paste the
<script></script>
tags). We take care of the HTML for you. The same applies to your custom code.
-
Open the Add Insertion modal.
- In eCommerce Admin, click + ADD NEW > Custom Script.
- In Web Office Admin, click + Add Insertion > select Custom Script from the Insertion Type menu.
-
Type a sort Name.
-
In the JavaScript Code Editor, type or paste your JavaScript syntax.
-
Enable the Published toggle to activate the script after saving.
-
Tailor the user tracking further with Multi-faceted Configuration if needed.
-
Click SAVE.
Replicated Site Insertions
📘Note
Only available in Web Office Admin.
You add Replicated Sites insertions using the same steps as the Javascript Insertions; however, configuration options are minimal because the replicated sites are public pages.
Both Google Analytics and Custom Script insertion types are available to add to a replicated site. Admin users will be able to Publish/Unpublish the insertion, but other configurations will be limited because they can not be enforced on public pages.
Updated over 3 years ago