Widget | IRUS-UK | Jisc
Skip to main content Jisc logo
  • Libraries, learning resources & research
  • Open access
    • CORE
    • Monitor Local
    • Monitor UK
    • OpenDoar
    • Open Research Hub
    • Publications Router
    • SHERPA services
    • UK ORCID

    We're working to develop services, provide support, and influence policy in order to enable UK higher education to realise the rewards of open access (OA).

  • About
    • What is IRUS?
    • Service description
    • Participants
    • Policies
    • Users and use cases
  • Support
    • Guides
    • Webinars
    • FAQs
    • Glossary
  • Updates
    • Announcements
    • Release notes
  • Participate
    • Join
    • Implement
    • Expose identifiers
    • IRUS-UK user group

IRUS-UK

  • Report
    • Custom Platform Master Report
    • Combined R4/R5 Platform Report

    • Custom Item Master Report
    • Individual Item Report

    • Item statistics by ORCID
  • Visualise
    • Top Items
  • Manage
    • DOI duplicates
    • Item type mappings
    • Processing statistics
  • Embed
    • API
    • Widget
    • Widget demonstrator
  • Service
    • IRUS
    • IRUS-UK
    • IRUS-ANZ
    • IRUS-US
    • IRUS-OAPEN

    • IRUS-UK (Legacy R4)
    • IRUS-ANZ (Legacy R4)
    • IRUS-US (Legacy R4)
  • IRUS
  • IRUS-UK
  • Embed
  • Widget

Widget

About the widgets

There are currently two widgets that enable COUNTER-conformant statistics from IRUS to be embedded into institutional repository pages. The widgets provide statistics from IRUS for a given platform/repository, or for an individual item within a given repository.

The output from each widget is displayed as a badge, which shows the overall total count (for a given Metric_Type) from the point at which the platform/item first appeared in the IRUS R5 service, and provides a link to a relevant report in IRUS.

By default this badge is accompanied by tabulated results from the most recent 6 months of IRUS data. However, there are a number of options available to tailor the display, and these are described in the configuration section below.

Embedding the widgets

A widget is embedded by simply adding code, like the examples below, into a web page at the desired point for the widget output to appear:

  • Platform/Repository level widget
  • <div id="irus_widget_container"></div>
    <script id="irus_pr_widget" src="https://irus.jisc.ac.uk/r5/uk/js/irus_pr_widget.js?requestor_id={institutional Requestor_ID}&platform={IRUS Repository_ID}"></script>

  • Item level widget
  • <div id="irus_widget_container"></div>
    <script id="irus_ir_widget" src="https://irus.jisc.ac.uk/r5/uk/js/irus_ir_widget.js?requestor_id={institutional Requestor_ID}&platform={IRUS Repository_ID}&item_id={item identifier}"></script>

Note that the {institutional Requestor_ID}, {IRUS Repository_ID} and {item identifier} terms in the above code examples must be replaced with acceptable values, as detailed in the following table.

Mandatory parameters

Parameter Description Applicable to Example
item_id An identifier for the item for which statistics are required - {item identifier} in the above examples. Three different types of identifier are permitted - an IRUS item_ID, a DOI or an OAI identifier. Item widget only item_id=10.1234/example/doi
platform The IRUS Repository_ID value for the platform/repository for which statistics are required - {IRUS Repository_ID} in the above examples. Valid values can be found by looking at the Repository_ID column in the table on the IRUS-UK Participants page. Platform & Item widgets platform=36
requestor_id The IRUS Requestor_ID value for the institution making the call to the widget - {institutional Requestor_ID} in the above examples. If unknown, the relevant value can be obtained by contacting our helpdesk with 'IRUS Widget' as the subject. Available to participating organisations only. Platform & Item widgets requestor_id=8b1a9953c4611296a827abf8c47804d7

Configuring the default display

It is possible to configure the default display by providing a number of additional, optional query parameters in the call to a widget, as detailed in the following table.

Optional parameters

Parameter Description Applicable to Default if omitted
allow_configuration Allow configuration within the widget output Platform & Item widgets no configuration
end_date The end of the date range for which to display statistics.
Format yyyy-mm
Platform & Item widgets date of latest available statistics in IRUS
metric_type The Metric_Type for which statistics are required; the count in the badge shows the overall total for the selected Metric_Type from the point at which the platform/item first appeared in the IRUS R5 service.
For an explanation of Metric_Types please see our Understanding and interpreting IRUS COUNTER Release 5 (R5) data guide.
Valid values are:
  • Total_Item_Investigations
  • Total_Item_Requests
  • Unique_Item_Investigations
  • Unique_Item_Requests
Platform & Item widgets Total_Item_Requests
show_all_metric_types Display the breakdown of counts, over the selected date range, for all Metric_Type values.
For an explanation of Metric_Types please see our Understanding and interpreting IRUS COUNTER Release 5 (R5) data guide.
Item widget only total for just the selected Metric_Type shown
show_badge_legend Display a legend under the badge Platform & Item widgets no legend shown
show_badge_only Display the badge only Platform & Item widgets tabulated results shown along with the badge
show_item_details Display metadata details for the specified item Item widget only no item details shown
show_item_types Display the breakdown of results, over the selected date range, by Item_Type.
For an explanation of Item_Types please see our Item types policy.
Platform widget only total for all Item_Types shown
start_date The start of the date range for which to display statistics.
Format yyyy-mm
Platform & Item widgets 6 months prior to the end_date

Additional parameters, if supplied, can be specified in any order though must be separated by an ampersand, e.g.

https://irus.jisc.ac.uk/r5/uk/js/irus_pr_widget.js?requestor_id={institutional Requestor_ID}&platform={IRUS Repository_ID}&end_date=2021_10&start_date=2021-08&show_badge_legend&show_item_types

Styling the widgets

Each widget can be styled to meet local requirements. The working example, below, uses the irus_r5_widget.css file, and this stylesheet can be referenced in local web pages, inside the <link> element, which is generally placed inside the <head> section of a web page:

<head>
<link href="https://irus.jisc.ac.uk/r5/uk/css/irus_r5_widget.css" rel="stylesheet">
</head>

However, this code can be copied locally and modified as required.

Trying the widgets

To see the widgets in action please see our Widget demonstrator.

Platform Widget Example

Contact
  • help@jisc.ac.uk
Useful links
  • Accessibility
  • Cookies
  • Privacy and your data
  • Twitter : @irusnews
Jisc logo

We’re a membership organisation, providing digital solutions for UK education and research

jisc.ac.uk

Libraries, learning resources and research
  • Learning and research resources
  • Library support
  • Open access