Installing the Discover module for Digital Experience integration
Learn how to install the Discover module for HCL Digital Experience integration.
Prerequisites
Before you can integrate HCL Digital Experience with HCL Discover, you must install and configure the following:
- HCL Discover
- HCL Digital Experience 9.5 Container Update CF192 and later
You can configure your HCL Digital Experience site theme integration with HCL Discover depending on your deployed Discover architecture. You have the following options:
-
Option 1 – Integration without a proxy
For this option, you set up a theme module that uses a JavaScript file that posts all the needed data on an HCL DX page to Discover.
-
Option 2 – Integration using a proxy
For this option, a proxy between the HCL Digital Experience and Discover servers is established. This uses the HCL DX Discover.ear as well as the additional theme module. You also need to set up a proxy in HCL Digital Experience, follow the instructions in the HCL Digital Experience Help Center topic: Outbound HTTP connection.
Enable HCL Discover integration in the Digital Experience Theme
Follow these steps to enable HCL Discover integration with HCL Digital Experience Theme.
-
Copy the discover and pako simple modules from PortalServer_root/doc/Discover folder to the theme modules.
For WebDAV-based themes:
Mycontenthandler/dav/fs-type1/theme/{custom-theme]/modules
Example:
For WAR-based themes:
Include it in the WAR file. Restart the server after installation.
-
After copying the folder with the JS files, update the Theme profile JSON file as follows:
Add the
Discover_[versionnumber]
inmodulesIDs
. It should be the first item. You can find the Discover release version number by finding theDiscover_v.xx
module in the PortalServer/doc/Discover folder.- Tip: Open the Discover.js file and search for
“getLibraryVersion”
.
- Tip: Open the Discover.js file and search for
-
After adding the HCL Discover version number ID to the profile JSON file, proceed to invalidate the theme cache.
Go to the Practitioner Studio menu and navigate to Theme > Analyzer > Utilities > Control Center page in Practitioner Studio as shown below. Select the Click to invalidate link under Invalidate Cache.
Setting up HCL Digital Experience theme with Discover extension
You can configure HCL Discover with HCL Digital Experience with theme modules. This gives you more granular control per page and when to use it. In this part, you will update your theme to add the Discover modules and update the profile.
-
Use the instructions in Part 3 of Lab HDX-DEV-100 Theme Development to work on your theme.
- From your DX Solution Modules SoFy instance, choose the Spotlight theme.
- Add the two modules discover_vxxx and pako_vxxx from the host of your DX server under PortalServer/doc/discover or get them from your unzipped lab files under the theme’s modules folder.
- Edit the DiscoverUI_for_DX-js.uncompressed.js.
- Search for the endpoint and change its entry to the Discover Packet Forwarder URL you just copied and save it.
-
Update the compressed version, DiscoverUI_for_DX.js. You can use a minifier, that can be installed as an extension or you can update it manually. You will see that the part of the services in the DiscoverUI_for_DX.js is not compressed.
-
Update the profile(s) of the theme for the sites you want to integrate. In DX Demo, this is the spotlight profile.
-
Save again and push the changes to your DX server.
- Test the changes are applied,
You have successfully deployed the Discover theme modules and added them to your profile used by your pages.
Install the HCL Discover.ear file
You would install the HCL DX Discover.ear only if you want to set up a proxy between HCL DX and Discover. Follow these steps to install the HCL Discover.ear file.
- From an HCL Digital Experience 9.5 Container Update CF192 and later, get the Discover.ear file from the PortalServer/doc/discover folder and install it using the HCL Digital Experience WebSphere Application Server console. The Discover.ear file contains the application that installs the DiscoverUIPost.JSP file required by Discover for the proxy architecture.
-
After getting the Discover.ear file, upload the file and install it using the WebSphere Application Server console:
- Navigate to the WebSphere Application Server console.
- Navigate to Applications > Application Types > WebSphere Enterprise Applications.
-
Click install, and select and open the Discover.ear file. Follow the prompts to complete the installation.
-
When completed, select the Discover module and start it from the WebSphere Application Server console.
Troubleshooting
Verify the integration between the HCL Discover and HCL Digital Experience Theme by using the Network Tab Tools from your browser.
- After you execute the Invalidate Cache step outlined in the previous section, proceed to turn on Remote Debugging. Refer to the previous figure example for the Remote Debugging command interface.
-
Go to the HCL Digital Experience Theme and open a Google Chrome browser Network tab.
Example:
Any event or DOM changes made sends a network request to the DiscoverUIPost.jsp (if using proxy) or the configured endpoint in the Discover.js. This means the HCL DX Discover module is installed successfully and is sending data to the configured endpoint.
Additional Setup Considerations
Additional information and modifications to the HCL Digital Experience Discover.js file may be required depending on the environment setup for the HCL DX site and the Discover server communications.
As noted in Option 2, for example, you may need to add a proxy in the HCL DX environment to connect to the Discover server. To set up a proxy in HCL Digital Experience, follow the instructions in the HCL Digital Experience Help Center topic: Outbound HTTP connection.
Additional configuration for appropriate HCL Discover capture and replay may also be required.
See the HCL Discover Help Center for information on Discover services, including session replay to assess the effectiveness of your DX site pages with end user audiences.
Example: