---
updatedAt: 2025-11-11T23:05:27.000Z
agentTools:
  projectIndex: https://developers.shipup.co/llms.txt
---

# Installing ShipupJS

<code>ShipupJS</code> is Shipup's JavaScript library to embed your tracking page on your website.

## Installation instructions

* Add those 2 tags between the <code>head</code> tags of your page (you can also add them in the <code>body</code> if you don't have access to the <code>head</code>.

```html
<script charset="UTF-8" type="text/javascript" src="https://cdn.shipup.co/latest_v2/shipup-js.js" async></script>
<link rel="stylesheet" href="https://cdn.shipup.co/latest_v2/shipup.css"></link>
<link rel="preload" href="https://cdn.shipup.co/latest_v2/91b29a9aa0797376c44c.woff2" as="font" type="font/woff2" crossorigin></link>
```

* Add a <code>div</code> with a custom id (<code>shipup-container</code> for instance) wherever you want in your page's <code>body</code> to display your tracking page.

```html
<div id="shipup-container"></div>
```

* Add this snippet at the end of your page's <code>body</code>. Be sure to replace <code>myPublicApiKey</code> with your own public API key and <code>shipup-container</code> with the id you chose on the previous step.

> 📘
>
> You can find your public API key [here](https://app.shipup.co/settings/general/#api-keys). Keys are located at the bottom of the page.

```html
<script type="text/javascript">
  window.ShipupLayer = window.ShipupLayer || [];
  window.ShipupLayer.push(function () {
    var shipup = new ShipupJS.default('myPublicApiKey');
    var element = document.getElementById('shipup-container');
    shipup.render(element);
  });
</script>
```

Here is a sample HTML file containing all 3 steps. You can use it as a starting point to start integrating you tracking page:

```html
<!DOCTYPE html>
<html>
  <head>
    <title>ShipupJS example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">

    <script type="text/javascript" src="https://cdn.shipup.co/latest_v2/shipup-js.js" async></script>
    <link rel="stylesheet" href="https://cdn.shipup.co/latest_v2/shipup.css"></link>
    <link rel="preload" href="https://cdn.shipup.co/latest_v2/91b29a9aa0797376c44c.woff2" as="font" type="font/woff2" crossorigin></link>
  </head>
  <body>
    <div id="shipup-container"></div>

    <script  type="text/javascript">
      window.ShipupLayer = window.ShipupLayer || [];
      window.ShipupLayer.push(function () {
        var shipup = new ShipupJS.default('myPublicApiKey');
        var element = document.getElementById('shipup-container');
        shipup.render(element);
      });
    </script>
  </body>
</html>
```

## Installation with RequireJS

> ❗️
>
> Try this process only if the previous one did not work on your application.

For application using <a href="https://requirejs.org/" target="_blank">RequireJS</a> as a Javascript module loader such as Magento 2,  the installation process is slightly different:

* Add the script in your `requirejs-config.js` paths.

```javascript
var config = {
    paths: {
        'ShipupJS': 'https://cdn.shipup.co/latest_v2/shipup-js'
    },
};
```

* Add a <code>div</code> with a custom id (<code>shipup-container</code> for instance) wherever you want in your page's <code>body</code> to display your tracking page.

```html
<div id="shipup-container"></div>
```

* Add this snippet at the end of your page's <code>body</code>. Be sure to replace <code>myPublicApiKey</code> with your own public API key and <code>shipup-container</code> with the id you chose on the previous step.

```html
<script  type="text/javascript">
  require(['ShipupJS'], function(ShipupJS) {
    var shipup = new ShipupJS.default('myPublicApiKey');
    var element = document.getElementById('shipup-container');
    shipup.render(element);
  });
</script>
```