Discover Uni (Unistats) widget guidance 2023
The Discover Uni widget is a small web application that displays Discover Uni course data. It
should be embedded within providers’ web pages.
The widget is designed to display data in context on undergraduate course pages and canbe configured to draw data from the corresponding course on the Discover Uni website.
When a user clicks on the widget, they are taken to the course record on Discover Uni where
they can access further information about that course and compare it to others.
The Discover Uni website will be updated with the C23061 Discover Uni dataset (formerly
the Unistats dataset) in October 2023. Data for the C23061 Discover Uni dataset will not
display on widgets until this dataset has been updated on the Discover Uni website. This
guidance sets out changes made to the widget, as well as guidance on how to configure any
new widgets.
Existing widgets on provider pages should automatically update to display the latest dataset
and any associated changes, provided the parameters set match the course information in
the C23061 Unistats dataset. Widgets for new courses, or courses that have changed theirKISCOURSEID, will not display data until the data has been updated on the Discover Uni
website in October. Please see the ‘course information’ section below for more information.

Requirements for display of the widget
A widget should be displayed for every course that appears on the Discover Uni website.
This includes courses where there is no data available for any or all of the data items
displayed on the widget, as it will enable users to link to the corresponding record on
Discover Uni where other course data will be displayed.
The widget should be displayed clearly on the landing page for the course. To ensurethat prospective students are likely to see the widget, it should be located alongside the core
information about the course.
The widget should appear on all university or college websites where a course isadvertised by 30 November 2023.
Please read this guidance to ensure your widgets are configured correctly. We haveincluded FAQs at the end of this document that may be helpful.
If you have any further queries about placement of the widget, please contact
discoveruni@officeforstudents.org.uk.

Key points: Discover Uni widget update•

The Discover Uni widget will continue to provide a direct link to data about the course
from providers’ course pages. It will continue to be available in horizontal, vertical, andresponsive formats and the URL will remain the same as currently.

1•

It is expected that a widget will be displayed for every course that appears on the
Discover Uni website. This should include courses where there is no data available forany of the data items displayed on the widget, as it will enable users to link to thecorresponding record on Discover Uni where other course data will be displayed.

•

Providers can continue to use either HTML or iFrame to configure their widgets.
Providers can display their widgets using the vertical, horizontal or responsive display
mode when using HTML; or the vertical or horizontal display mode in IFrame.

•

Please ensure that you check that widgets currently displaying on your webpages areadhering to the height and size styles outlined in the ‘how to embed the widget’ section
below and use this guidance to implement any further widgets on your pages.

•

A number of accessibility updates have been made to the widget. Please see the ‘Widget
accessibility improvements’ section below for more details.

The data displayed on the widget
The widget has been updated to display data from the C23061 Discover Uni dataset. This
includes data from the National Student Survey 2023, which has been revised following its
recent consultation and review. Please see the Office for Students website for more
information on the changes to the survey questions and response scales for the NSS 2023:
www.officeforstudents.org.uk/data-and-analysis/national-student-survey-data/aboutthe-nss-data/.
To reflect the newest data, where data is available for a course, the widget will now display:
1. % of students in the National Student Survey were satisfied overall with theircourse (for providers in Northern Ireland, Scotland and Wales only*).
2. % in work or doing further study 15 months after the course from the Graduate
Outcomes Survey.
3. % of students in the National Student Survey say staff have supported theirlearning well.
If a course has multiple subjects associated with it, which result in multiple instances of eachdata item, data will not be displayed on the widget. Instead, the name of the course will be
displayed, and users can click on the widget to go to the Discover Uni course page to see
the full set of data available for the course. Please see example 4 given below.
If the data has been aggregated due to publication thresholds, it will be clear that data
displayed is for all courses in that subject area or if it is using two years of data.
* We aim to include a third datapoint on the widget for courses in England – this may be after thedataset has been published.

Examples of the data displayed on the widget2

Widget accessibility improvements
Over the past year, we have been developing and updating the widget to improveaccessibility. The current features include:• Increased size of some text
• Ensuring the colour contrasts on the display meet WCAG guidelines• Functionality enabling the user to hover over the widget to pause the scrolling element• The code is correctly labelled to work best with screen readers and other assistive
devices.
We have plans to develop the widget further and will aim for the highest standards ofaccessibility, whilst allowing it to be user-friendly for those implementing the widget andthose viewing it on your pages.

3How to set up the widget
The widget can be embedded in a web page using either the HTML5+JavaScript snippet or
an iFrame.
Depending on your content security settings, you may need to contact the team managing
the website you are using to whitelist the 'https://discoveruni.gov.uk' domain for either ofthese two methods to work.
The widget can be displayed at fixed dimensions, either vertically (this is the default),
horizontally or responsive.

Course information you need
There are three essential pieces of course information which need to be set for thewidget to display data for the relevant course. The widget can also display course
information in the Welsh language, so the ‘language’ information should be set to en-GB for
English (this is the default setting) or cy-GB for Welsh.
Parameter

StatusDescription<PUBUKPRN>

Essential

This is the UKRPN for the institution under which thecourse is published/listed on Discover Uni.
This can be found in the Discover Uni dataset(formerly Unistats) from 4 October. Alternatively, it
can easily be found in the course page URL on
Discover Uni from 6 October 2023, when the newdataset is published. See ‘How to find the course
information’ section below for details.

<KISCOURSEID>

Essential

This is the KISCOURSEID associated with thecourse in the institution's Unistats data. Please notethat if your KISCOURSEID contains any of thefollowing characters: '/', '|', ':', '&', '.', '>', '+', '#', ';', '?','@' and '=' then you will need to replace thesecharacters with an underscore '_' when configuring
the widget. For example, if your KISCOURSEID is
ABCD/34 then the KISCOURSEID used for thewidget will need to be ABCD_34.

<KISMODE>

Essential for parttime courses

This identifies if a course is FullTime or PartTime. It
will default to FullTime if not specified.

<LANGUAGE>

OptionalThis can be set to en-GB' for English or cy-GB for
Welsh. The language parameter is used if you wish
to force the widget to use a particular language. If it
is not supplied then the language will be determinedfrom the browser settings of the user viewing the
web page hosting the widget, defaulting to en-GB if
the browser settings are neither en-GB or cy-GB.

4

How to find the course information
The PUBUKRPN, KISCOURSEID and KISMODE is based on the course information
submitted to Jisc (formerly known as HESA) by each provider in their Unistats return (whichis then published on Discover Uni as part of the C23061 Discover Uni dataset).
• From 4 October 2023 you can download the latest Discover Uni dataset (formerly
Unistats) for C23061 from https://www.hesa.ac.uk/collection/c23061. The information you
need can be found in the ‘KISCOURSE’ file, where you will see ‘PUBUKPRN’,‘KISCOURSEID’, and ‘KISMODE’ data in the fields for each course.
• Alternatively, this information can easily be found in the course page URL from early
October 2023, when the new dataset is published on the Discover Uni website, as
follows:
1. Search for your institution and select the course on the Discover Uni website:
https://discoveruni.gov.uk/
2. Copy and paste the URL for the course page, for example:
https://discoveruni.gov.uk/course-details/10796291/K00592/FullTime/The URL is constructed in the format:
https://discoveruni.gov.uk/course-details/PUBUKPRN/KISCOURSEID/KISMODE/
Therefore, in the example above you would configure the widget with these settings:
PUBUKPRN = 10796291
KISCOURSEID = K00592
KISMODE = FullTime

Display mode
• The widget is available in horizontal, vertical, and responsive formats. It will default tovertical if not specified.
• You can use either HTML+JavaScript or an iFrame to configure your widgets. You candisplay your widgets using the vertical, horizontal or responsive display mode when using
HTML+JavaScript; or the vertical or horizontal display mode in iFrame.
• You must ensure that all widgets are set up using the height and size styles outlined
below.

HTML+JavaScript• Vertical: a fixed size of 190 x 500 pixels• Horizontal: a fixed size of 615 x 150 pixels• Responsive: the widget will adapt to the width of the containing element and expand its
height as necessary. The minimum width is 190 pixels.

iFrame
The iFrame snippet can only display the widget in vertical or horizontal mode. The
responsive mode is not supported.

5• Vertical: a fixed size of 198 x 508 pixels• Horizontal: a fixed size of 624 x 158 pixels

Options for embedding the widget
For best compatibility with mobile devices, the hosting page should also contain the following
meta tag in the 'head' section.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
The section below explains how to add your course information in the parameters
highlighted in the <angle brackets>. (Please remove the angle brackets (< and >) whensetting your course information parameters.)

HTML+JavaScript snippet
The following JavaScript must be added to the web page hosting the widget, at the bottom of
the page, before the closing </body> tag:<script>(function (d) {"use strict";
var widgetScript = d.createElement("script");
widgetScript.id = "unistats-widget-script";
widgetScript.src = "https://discoveruni.gov.uk/widget/embed-script";
var scriptTags = d.getElementsByTagName("script")[0];if (d.getElementById("unistats-widget-script")) {return;}scriptTags.parentNode.insertBefore(widgetScript, scriptTags);})(document);</script>

HTML
Horizontal widget<div class="kis-widget"style="width:615px; height:150px"
data-institution="<PUBUKPRN>"
data-course="<KISCOURSEID>"
data-kismode="<KISMODE>"
data-orientation="horizontal"
data-language="<LANGUAGE>"></div>

6

Vertical widget<div class="kis-widget"style="width:190px; height:500px"
data-institution="<PUBUKPRN>"
data-course="<KISCOURSEID>"
data-kismode="<KISMODE>"
data-orientation="vertical"
data-language="<LANGUAGE>"></div>

Responsive widget<div class="kis-widget"style="min-width:190px;"
data-institution="<PUBUKPRN>"
data-course="<KISCOURSEID>"
data-kismode="<KISMODE>"
data-orientation="responsive"data-language="<LANGUAGE>"></div>

IFrame: Please note that the IFrame snippet can only display the widget in vertical or
horizontal mode. The responsive mode is not supported.

Horizontal iFrame<iframe id="unistats-widget-frame" title="Unistats KIS Widget"
src="https://discoveruni.gov.uk/widget/<PUBUKPRN>/<KISCOURSEID>/horizontal/small/<LANGUAGE>/<KISMODE>"
scrolling="no" style="border: 0px none transparent; width: 624px; height:158px;">

Vertical iFrame<iframe id="unistats-widget-frame" title="Unistats KIS Widget"
src="https://discoveruni.gov.uk/widget/<PUBUKPRN>/<KISCOURSEID>/vertical/small/<LANGUAGE>/<KISMODE>"
scrolling="no" style="border: 0px none transparent; width: 198px; height:508px;">

Troubleshooting
If the widget is configured correctly, it will display data for the relevant course and clicking on
it will take the user to that course on the Discover Uni website.
• Ensure KISCOURSEID and PUBUKPRN are set correctly as in the new Discover Uni
dataset (formerly Unistats) for C23061.
• If the KISCOURSEID and PUBUKRPN are not set correctly, the widget will display astandard ‘undefined’ message and the ‘see course data’ button will link to the Discover7

Uni website homepage. This can usually be rectified by amending the incorrect parameterwithin the widget.
• Please remove the angle brackets (< and >) when setting your course information
parameters.
• Do not attempt to override any styles relating to the widget, nor reformat the widget in any
way. This is likely to cause presentation issues with the widget or cause it to fail.
• Some styling and formatting that are applied to provider webpages can affect the displayof the widget. The font-size on the provider website page should be set to 100% toensure optimal display of the widget.
• Do not try to place a widget in a container smaller than the required size for the widget(refer to sizes above).
• Do not remove the inline height/ width styles.
• Do not attempt to relocate the script (<script>) for the widget to another file. Please only
place this script at the bottom of the page before the closing </body> tag.

Frequently asked questions
Is it acceptable for the user to have to scroll to view the widget?
If it is necessary to place the widget below other content in order to accommodate it, this is
acceptable, provided the user would need to scroll to view other information about thecourse (i.e. there should not be a break in content before the widget that would make theuser think they had reached the end of the page content).

Is it acceptable to display the widget on a tab or use a pop-up or
accordion that requires the user to click on a link or expand?
The widget should be visible when the page loads and the user should not have to click onanother tab or a link to view it. It is acceptable to use pop-ups or accordions if it is necessary
to display a large number of widgets on one course page (i.e. greater than four), although
the page should be designed so that at least one widget is visible when the page loads.

Can I add my own information/formatting to the widget?
You should not reformat the widget and should not place any content directly beside it that
could either be perceived as being associated with the widget. The terms Key Information
Set, KIS or Unistats should not be used to label the widget. Please also note that someexisting formatting and style rules that are applied to the provider page can affect the displayof the widget. Please see the ‘course information’ section above for more details.

Do I need to display two widgets if the course is available on a full-timeand part-time basis?
Yes. A separate widget should be displayed that links to the part-time instance of the course
if the course is advertised on both a full-time and part-time basis. This is because the data
often varies by mode of study. If both modes are advertised on the same course page, thenthat page should display both widgets.

8

I have several variations of a course advertised on one page. Do I needto display a widget for each variation?
If your course has versions that both include and do not include a sandwich year or a year
abroad, for example, you will have returned a separate record for each of these forpublication on Discover Uni. You should display a widget for each course record. Where
multiple combined honours options are listed on a single course page, you should display awidget for each, but it is acceptable to insert links that the user can click on to view thewidget for each available combination. The widget for the main instance of the course should
be visible when the page loads.

Forthcoming widget redevelopment
During 2023-24 we anticipate that a new Discover Uni widget will be developed and thedesign will be updated.

Updated guidance will be published prior to the new widget being made available.
If you have any further queries about configuration or placement of the widget, pleasecontact discoveruni@officeforstudents.org.uk.

9