The JavaScript Insertion page allows you to add JavaScript to your eCommerce Shop. A common use of this feature is adding third party chat/support widget, or Google Analytics. Any valid JavaScript can be inserted into the eCommerce Shop to provide a wide range of custom functionality, such as overriding the system CSS.
What We’ll Cover
Finding the Page
In eCommerce Admin, navigate to: Advanced Customization > Javascript Insertion.
[CLIENTID].retailadmin.directscale.com/#/Insertion
Adding Google Analytics
Configure Google Analytics tracking for your eCommerce Shop.
This will track users in the eCommerce Shop as they move between pages and the URL changes. This doesn’t, however, capture features clicked within a page if the URL does not change.
To find the Google Analytics ID:
1. Sign in to your Analytics account.
2. Click Admin.
3. Select an account from the menu in the ACCOUNT column.
4. Select a property from the menu in the PROPERTY column.
5. Under PROPERTY, click Tracking Info > Tracking Code. Your Tracking ID is displayed at the top of the page.
-
Click + ADD NEW and select Google Analytics. The Add Insertion pop-up window opens.
Google Analytics Add Insertion pop-up window elements (Click to enlarge) -
Type a memorable Name for your insertion to provide context and aid in finding it later.
-
Paste you Google Analytics Tracking Code.
-
Toggle the publication state of the tracking. Clicking the toggle on in conjunction with the SAVE button will add the tracking to the list and to the eCommerce Shop.
-
The rest of the settings are Multi-Faceted Configuration (MFC)
-
SAVE the insertion configuration.
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 own custom code.
-
Click + ADD NEW and select Custom Script. The Add Insertion pop-up window opens.
Custom Script Add Insertion pop-up window (Click to enlarge) -
Type a memorable Name for your JavaScript insertion to provide context and aid in finding it later.
-
In the JavaScript Code Editor type or paste your own JavaScript syntax.
-
Toggle the publication state of the tracking. Clicking the toggle on in conjunction with the SAVE button will add the tracking to the list and to the eCommerce Shop.
-
SAVE the insertion configuration.
In the next section is an example of inserting your own JavaScript code to create functionality not available by default.
Comments
0 comments
Please sign in to leave a comment.