Using the third-party EPrints plugin for Altmetric

 

The source files and documentation for EPrints plugin can be found here

 

Please note that the plugin was not developed by Altmetric, but was created by a third-party. As such, you should use the plugin at your own risk and direct any technical support requests to the developer of the plugin.

 

Using the Altmetric badges on EPrints (wrapper method)

 

To save some implementation time we've developed a wrapper for the standard embeds script that should make it easier to use on EPrints article pages.

 

By default the Altmetric embeds require you to specify the DOI of the article you want to see data for, by including a data-doi attribute. Depending on how handy you are with EPrints page templates this can be tricky. By using the eprints.embed.js script instead you can skip that part of things: it should pick DOIs up automatically (if they're available) from metadata on the EPrints pages.

 

To use it instead of the normal Altmetric embed script you should include this line somewhere on your article pages:

 

<script src='http://d1uo4w7k31k5mn.cloudfront.net/eprints.embed.js/script

 

Then simply put a <div> element with the 'altmetric-embed' class wherever you want the Altmetric badge to appear:

 

<div class='altmetric-embed'></div>

 

You can still use any of the options listed on the embeds help page. For example to use donut style badges add a data-badge-type attribute:

 

<div class='altmetric-embed' data-badge-type='donut'></div>

 

... or data-badge-popover for a pop-up legend:

 

<div class='altmetric-embed' data-badge-type='donut' data-badge-popover='left'></div>


Warning! Though we've tested this script the code remains untested in the real world. It's possible that use in a production environment will turn up bugs - let us know if anything does go wrong and we'll try our best to fix things.