Onboarding for SmartRecommend
SmartRecommend provides tailored recommendations to your users through 2 modes:
ML-based Recommendations - Automated predictions powered by a Machine Learning model that learns from user interactions.
This model recommends links based on three key factors:User interaction history: Derived from users’ previous activity, including clicks and page views.
Popularity of website pages: Pages that receive more user engagement are displayed higher in the recommendations.
Relevance score: Pages are shown based on their predicted relevance, with the highest-scoring ones displayed first.
This approach allows for personalised recommendations without requiring site owners to manually define the recommendation rules.
Rule-based Recommendations - Allows you to define specific rules and deterministic call-to-actions for targeted recommendations.
Pre-requisite:
For real-time recommendations to function correctly on your site, please ensure your website is onboarded to WOGAA and wogaa.js script is included on your website.
Step 1: Configure Your SmartRecommend Banner in Admin Portal
Access the Admin Portal and follow the user guide for Rule-based or ML-based to set up your banner and obtain the clientId for next step.
Step 2: Model Provisioning and Monitoring
(Required only for ML-based)
After obtaining your clientId, please submit your request through our Contact Us Form.
Under
Ticket Request Type, select “Service Request”.In the
Details of Request, clearly indicate that the request is for onboarding an ML-based banner.
Our team will provision a recommendation model for your website and monitor its performance over 1 to 2 working weeks to ensure smooth onboarding and optimal recommendation quality.
Step 3: Integrate SmartRecommend into Your Website
Step 3.1. Load the searchconfig.js script
(Required only if your website has not yet onboarded to Website Search, or if the SmartRecommend banners have been configured on different sites from your website’s search bar in the admin portal)
Add the following snippet into the <head> section of your pages that requires the SmartRecommend.
searchconfig.js - Configuration script for all environments
<script
id="searchsg-config"
src="https://api.search.gov.sg/v1/searchconfig.js?clientId=<your-issued-client-id>"
defer
></script>Step 3.2. Adjust CSP Rules on your website to allow for SearchSG domain resources
If your website uses Content Security Policy (CSP), update CSP to add the following code:
default-src 'self' https://www.search.gov.sg;
frame-src 'self' https://www.search.gov.sg https://www.google.com;
script-src 'self' blob: https://api.search.gov.sg https://www.search.gov.sg https://www.google.com https://www.gstatic.com;
connect-src 'self' https://api.search.gov.sg https://assets.search.gov.sg;
style-src 'self' 'unsafe-inline' https://www.search.gov.sg;
img-src 'self' data: https://assets.search.gov.sg;
font-src 'self' data: https://www.search.gov.sg;Step 3.3. Determine the Banner Display Location
Insert the following code snippet in the body section of your page where the SmartRecommend banner should be rendered:
<div id="<your-configured-html-marker>" />This div acts as the container where SmartRecommend will inject and render the banner content dynamically based on configurations.
Step 3.4. Publish Your Custom Structured Metadata
(Required only for ML-based using Web Data Sources)
Follow the guide to publish your custom structured metadata in JSON+LD data format on each pages on your website.
Step 3.5. Verify SmartRecommend Banner Appearance and Functionality
After completing the steps above, load the target page(s) where the banner is expected. Then verify the banner functionality for both ML-based and Rule-based recommendations:
For both types, ensure the banner appears at the correct location, displays the correct title and recommended links, and all links function correctly when clicked.
For
Rule-based, test one of the configured rules and confirm that the banner displays the correct predefined set of recommended links based on the rule conditions.