When a user clicks on a link to an item page (i.e. to view item metadata) or an associated file (i.e. requests a download) from a Repository with the tracker protocol in operation, if HTTP Status code 200 or 304 is returned for that request, an OpenURL log entry is sent to an endpoint on the IRUS server for further processing.
Constructing the OpenURL log entry
The OpenURL log entry should be based on a subset of the NISO OpenURL 1.0 standard KEV ContextObject Format. The OpenURL string values must be URL encoded, with key-value pairs separated by an ampersand (&)
||OpenURL Value (example)
||Identifies data as OpenURL 1.0. String constant: Z39.88-2004 (Mandatory)
|Usage event datestamp
||Date/time of usage event (Mandatory)
|Usage event type
||Valid values are ‘Investigation’ for item page/metadata views and ‘Request’ for file downloads (Mandatory)
|Client IP address
||IP Address of the client requesting the article (Mandatory)
||The UserAgent is used to identify and eliminate, by applying COUNTER rules, accesses by robots/spiders (Mandatory)
|Item OAI identifier
||Canonical identifier for retrieving item metadata from the source repository (Mandatory)
||The URL of the item page for an Investigation or the URL of the file downloaded for a Request (Mandatory)
||(Mandatory) The HTTP header field that identifies the address of the webpage (i.e. the URI) that linked to the resource being requested, which is used to help identify and eliminate accesses by robots/spiders
Information about robot downloads need not be transmitted to the IRUS server. Before attempting to transmit the OpenURL, a check may be carried out to eliminate robots as defined in the COUNTER official list, which is available as a series of user-agent regexes in a text file maintained and available on github.
Checking against these regexes should be case insensitive.
Once the OpenURL has been constructed, it will need to be transmitted to the IRUS server where it will be stored and processed.
If the transmission is successful the IRUS server will return a 200 OK code.
If the transmission is not successful, e.g. a 4xx or 5xx code is returned, the OpenURL string should be queued for processing later, e.g. appended to a file held on the local server. A script, that can be scheduled to run periodically, should check if there are queued entries and, if there are, re-transmit them.