Altmetric.com embeds allow you to add new altmetrics data to your content with a minimum of fuss and technical effort – all you need to do is add two lines of code to your HTML. We host the altmetrics data that your readers will see, but give you control over their presentation.
The process involves three steps:
- Ensure we are tracking your domains;
- Ensure you have identifying metadata on your article pages;
- Add our badge code to your pages;
Ensure we are tracking your domains
To properly track your content, we need to know the domain names on which you’ll be using the badges: e.g. stmpublisher.com, repository.university.edu.
For publishers: if any journals on your platform have their own custom domains, e.g., myjournal.com, please tell us about those too by emailing firstname.lastname@example.org.
Ensure you have identifying metadata on your article and/or book pages
In order to disambiguate mentions of articles, we look for identifiers such as DOIs, PubMed IDs and arXiv IDs in your pages. To ensure we can do this easily, it helps if you follow Google Scholar’s “Inclusion Guidelines for Webmasters” (http://scholar.google.com/intl/en-gb/scholar/inclusion.html#indexing) specifically adding meta-tags with DOIs or PubMed IDs like so at the top of your pages:
<meta name="citation_doi" content="10.1234/journal123"> <meta name="citation_pmid" content="1234"> <meta name="citation_arxiv_id" content="12345">
We also look for meta-tags specific to certain repository software such as Bepress like so:
<meta name="bepress_citation_doi" content="10.1234/journal123">
(You can find the full list of metadata tags we support at the bottom of this page.)
If you are unable to make such changes to your article pages, please get in touch with us at email@example.com to see if we could add a custom integration to identify your articles (perhaps by placing an ID in another location).
Add our badge code to your pages
You can find complete instructions on using our embeddable badge code at http://api.altmetric.com/embeds.html and even interactively build your own snippet using our interactive form at http://api.altmetric.com/embeds.html#interactive
The high level overview is that you need to add the following snippet to your HTML:
Then wherever you want to place a badge, you add an element like so:
<div class="altmetric-embed" data-badge-type="donut" data-doi="10.1038/nature.2012.9872"></div>
data-doi attribute contains the DOI of the article for which you wish to display a badge.
If you don’t have DOIs then you can use handles or PubMed IDs instead like so:
<div class="altmetric-embed" data-pmid="21148220"></div> <div class="altmetric-embed" data-handle="10255/dryad.40269"></div>
If your platform doesn’t allow you to specify
data- attributes, you can also use CSS classes instead like so:
<div class="altmetric-embed altmetric-badge-type-donut altmetric-badge-popover-left altmetric-doi-10.5339/connect.2012.9"></div>
What if I want a richer integration and access to the underlying data?
If you want to develop against the raw Altmetric API rather than using the embeddable badges then please get in touch with firstname.lastname@example.org to request an API key.
Supported metadata tags
Please note that all tag names are case-insensitive.
DOIs & Handles