Guidance on using the Discover Uni widget
This information is provided as part of Department for Education (DfE) guidance for providers regarding transparency in advertising to ensure that any potential applicant is aware of the official data that Discover Uni provides and has the opportunity to use the data to inform their decision making.
The Discover Uni widget is the recommended means of signposting to the Discover Uni course page in online advertising and marketing, as it takes applicants directly to the relevant and up to date data.
A widget should be used for advertising or marketing of any course that appears on the Discover Uni website.
It should currently be displayed clearly on every course page on all university and college websites where a course is advertised and appears on the Discover Uni website. This includes courses where there is no data available for any 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.
Under the DfE transparency in advertising guidance, other online marketing or advertising of any courses, such as on third party websites, should also use the widget where possible.
About the widget
The Discover Uni widget is a small web application that displays the Discover Uni course data (formerly called Unistats). It can be embedded within webpages.
The widget displays 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 all the information about that course.
The course data is updated weekly to reflect any minor changes to course data and then annually in the autumn with the publication of the latest dataset. Existing widgets on provider or other webpages will automatically update to display the latest dataset and any associated changes.
The data currently displayed on the widget
The widget currently displays up to three data items if they are available for a course. These are:
- Percentage of students in work or further study after 15 months from the Graduate Outcomes survey
- Percentage of students in the National Student Survey who said staff have supported their learning well.
And an additional datapoint, depending on if the course is in England, Scotland, Wales or Northern Ireland:
- Percentage of students in the National Student Survey who were satisfied overall with their course (for providers in Northern Ireland, Scotland and Wales only)
- Percentage of students in the National Student Survey who said staff value students’ views and opinions about the course (for providers in England only).
If the course has multiple subjects associated with it, which would result in multiple instances of each data 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 examples given below.
If the data has been aggregated due to data publication thresholds for that course, it will be clear that data displayed is for all courses in that subject area.
Forthcoming widget development
Within the C23061 widget guidance, it was noted that there were plans to rebuild the Discover Uni widget. New designs for the widget have been created and feedback has been gathered through user testing which has informed the design and functionality.
A main purpose of the widget rebuild is to improve the accessibility of the widget. The new designs have been built in compliance with accessibility standards and the proposed designs include a number of changes which enhance the accessibility.
The new widget will be made available later in the year and we anticipate that there will be a one-year period to implement the new design. Updated guidance will be published prior to the new widget being made available.
How to set up the widget
The widget can be embedded in a webpage 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 of these two methods to work.
The widget can be displayed at fixed dimensions either vertically (this is the default), horizontally or responsive.
Course information
There are three essential pieces of course information which need to be set for the widget to display data for the relevant course. These are:
Information |
Status |
What this is |
---|---|---|
PUBUKPRN
|
Essential |
This is the UKRLP registration number for the teaching institution under which the course is published on Discover Uni. |
KISCOURSEID |
Essential |
This is the unique course identifier associated with the course in the institution's Unistats data. |
KISMODE |
Essential for part-time courses |
This identifies if the course is 'FullTime' or 'PartTime'. It will default to FullTime if not specified. |
This information can be obtained from the URL for a course on the Discover Uni website as set out below:
-
Search for your institution and select the course on the Discover Uni website
-
Copy and paste the URL for the course page, for example:
https://discoveruni.gov.uk/course-details/10796291/K00592/FullTime/ -
Our URLs are 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
If your KISCOURSEID contains any of the following characters: '/', '|', ':', '&', '.', '>', '+', '#', ';', '?', '@' and '=' then you will need to replace these characters with an underscore '_' when configuring the widget. For example, if your KISCOURSEID is ABCD/34 then the KISCOURSEID used for the widget will need to be ABCD_34.
The widget is available in English and Welsh. The language can be set to ‘en-GB' for English or ‘cy-GB’ for Welsh. If the language is not included, it will be determined from the browser settings of the user viewing the webpage hosting the widget, defaulting to ‘en-GB’ if the browser settings are neither ‘en-GB’ or ‘cy-GB’. See the C24061 widget guidance for further guidance.
Display mode
- The widget is available in horizontal, vertical, and responsive formats. It will default to vertical if not specified.
- You can use either HTML+JavaScript or an iFrame to configure your widgets. You can display 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 no longer supported.
- Vertical: a fixed size of 198 x 508 pixels
- Horizontal: a fixed size of 624 x 158 pixels
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">
To enable the HTML+JavaScript widget on a page, this script must be added at the bottom of the page before the closing </body> tag. This is not required if you are using iFrame.
<script>
(function (d) {
"use strict";
var widgetScript = d.createElement("script");
widgetScript.id = "unistats-widget-script";
widgetScript.src = "//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>
Widget code
Once you have chosen your display mode, pick the corresponding widget HTML to add to your page in the position you would like it to display. In each of these widget HTML snippets, you will need to replace the words PUBUKPRN, KISCOURSEID and KISMODE as explained in the ‘Course information’ section above.
<div class="kis-widget"
style="width:615px; height:150px"
data-institution="PUBUKPRN"
data-course="KISCOURSEID"
data-kismode="KISMODE"
data-orientation="horizontal"
data-language="en-GB"
</div>
<div class="kis-widget"
style="width:190px; height:500px"
data-institution="PUBUKPRN"
data-course="KISCOURSEID"
data-kismode="KISMODE"
data-orientation="vertical"
data-language="en-GB"
</div>
<div class="kis-widget"
style="min-width:190px;"
data-institution="PUBUKPRN"
data-course="KISCOURSEID"
data-kismode="KISMODE"
data-orientation="responsive"
data-language="en-GB"
</div>
<iframe id="unistats-widget-frame" title="Unistats KIS Widget"
src="https://discoveruni.gov.uk/widget/PUBUKPRN/KISCOURSEID/horizontal/small/en-GB/KISMODE"
scrolling="no" style="border: 0px none transparent; width: 624px; height:158px;">
<iframe id="unistats-widget-frame" title="Unistats KIS Widget"
src="https://discoveruni.gov.uk/widget/PUBUKPRN/KISCOURSEID/vertical/small/en-GB/KISMODE"
scrolling="no" style="border: 0px none transparent; width: 198px; height:508px;">
- Please do not try to override any styles relating to the widget, nor reformat the widget in any way. This will cause presentation issues with the widget or cause it to fail.
- 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 try to relocate the script (<script>) for the HTML+JavaScript widget to the <head> or another file. The script must be placed after the widget code in the page (we recommend placing at the bottom of the page before the closing </body> tag).
- Ensure KISCOURSEID is set correctly as per the Discover Uni course page URL.
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. If it is not configured in a way that corresponds with a course on the website, it will display a standard error message and link to the website homepage.
Contact us
If you have any queries about the configuration or placement of the widget, please contact us at [email protected].
Last updated 04 October 2024 + show all updates
04 October 2024 - Information updated for 2024.
Describe your experience of using this website