Dimensions Badge not working perfectly. Require to remove "https://doi.org/" from DOI

Dear OJS community,

I am encountring a problem while integrating Dimensions badge on OJS article landing page.

The script of the badge integration is as follows:

Step 1: Include the setup code anywhere on your page:

Copy to clipboard

<script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>

Step 2: Include the badge code at the position in the page you want the badge to appear:

Copy to clipboard

<span class="__dimensions_badge_embed__" data-doi="10.1001/jama.2016.9797"></span>

So I changed the second code to

<span class="__dimensions_badge_embed__" data-doi="{$doiUrl}"></span>

But the output url is

<span class="__dimensions_badge_embed__" data-doi="https://doi.org/10.1001/jama.2016.9797"></span>

I need to remove the “https://doi.org/” from the url to work the badge perfectly as currently it is giving “?” sign instead of number of citations in the badge.

Screenshot attached.

Kindly assist me.Capture

Screenshot_2020-08-11-20-42-52-34

Try to change $doiUrl to $idPub

Hello Muhammad K,

Thanks your suggestion worked perfectly, however, I am using OJS 3.1 and the $idPub should be $pubId in this case.

Here is the final output:

Capture

Thanks again.!