Below, we have explained the different options available, their configuration and what they do.
Custom Unsupported Browser Message
Version 1.4 and upwards
On version BidJS 1.4 and above, an alert is now displayed to BidJS visitors who are using Internet Explorer 11 or below. This warns them they they are using an unsupported browser, and that this browser does not ensure full functionality. You can customise this message by putting your content within this option field:
unsupportedBrowserMessage: 'Your browser is not supported. Please use a browser such as Google Chrome or Microsoft Edge to ensure full functionality'
Google Analytics Tracking
Version 1.5 and upwards
On version BidJS 1.5 and above, you now have the ability to pass in your Google Analytics tracking ID, to get BidJS pages added to your reports
If you have already initialised analytics on your website with a specific namespace, you can also define this. If you're not sure if this applies to you, it likely doesn't.
Dynamic Page Title
You can pass an option to allow the BidJS client to dynamically update the Page Title, using titles specified within the Management Console. This is particularly useful for SEO, and may result in your items being ranked higher within Google Search Results.
Unless specified, this defaults to false.
Dynamic Meta Description
You can pass an option to allow the BidJS client to dynamically update the Meta Description (if it exists on your page), using values specified within the Management Console. This is particularly useful for SEO, and may result in your items being ranked higher within Google Search Results.
Unless specified, this defaults to false.
Scroll to Position (available Feb 2020)
You can select a position to scroll to when clicking between BidJS pages by assigning an ID to a page element (such as a heading, paragraph, div, etc.) and then specifying this ID in the scrollOnNavigationElementId option, as follows:
Where 'main-navigation' is an ID you have chosen and entered into your code, for example:
<h1 id='main-navigation'>Welcome to my website</h1>
By default, the page will scroll to the top of the BidJS container. If scrollOnNavigationElementId has been added but the ID tag cannot be found, then the software will scroll to the top of the page.
Event Callback can be used by replacing the console.log(event) with your own script. Your script will be passed using the events listed below, using the following format:
// some events send additional information, e.g. `BIDJS_NAVIGATED` also sends `path`, with a value of the current page
Here are the available events:
BIDJS_MODULES_INITIALISED - When BidJS scripts first start
BIDJS_MODULES_LOADED - When BidJS has finished starting, and is a functioning application
BIDJS_AUTHENTICATED - When the application deems the user to be logged in (SSO or Native)
BIDJS_UNAUTHENTICATED - When the application deems the user to be logged out (SSO or Native)
BIDJS_MODULES_NAVIGATED - Whenever the BidJS page changes (includes
data.path to show the page navigated to
Webcast Module (available from October 2019)
This implements our new webcast module with a full redesign and bug fixes. We recommend this for use by all webcast clients, however, if you would prefer to revert to the legacy webcast view, please change webcast to 'false'.
You can pass a set of options to enable OAuth Authentication with your own OAuth server. For more information, please see the OAuth Authentication section.
Unless specified, this defaults to
ISTOKENLOCALSTORAGE (BOOLEAN | OPTIONAL | DEFAULT: FALSE)
If True, we will look for your authentication token as a localStorage item, if False, we will look for your token as a cookie.
LOGINURL (STRING | REQUIRED)
The URL we should send users to in order to login
Note: we recommend your login page has the ability to redirect users to a url defined as a parameter (seen in the example above).
If your login page has the ability to redirect upon login, you can enter
<<REDIRECT>> to the defined
loginUrl, and this will be replaced by a URLEncoded version of the current URL upon navigation, to ensure the user is returned to the previous page upon successful login.
LOGOUTURL (STRING | REQUIRED)
The URL we should send users to upon logging out of the BidJS Application (normally your OAuth logout URL)
TOKENNAME (STRING | REQUIRED)
The name / key of the token, which you store as LocalStorage Item or Cookie