Installation
jsDelivr
Option 1: Use CDN fromNo installation is required to use Amplitude.js. All you need to do is include a single line in your <head>
section of your HTML page.
Replace version-number
with the exact version number that you would like to use (see our releases for what version number to use):
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/amplitudejs@{{version-number}}/dist/amplitude.js"></script>
NOTE: It's best to set your version number manually to make sure you have full control of what version you are running. If you need to upgrade in the future, just change version-number
to the latest version.
npm
Option 2: Automatic install via Download it via NPM to your existing project:
npm install --save amplitudejs
You will see the file under node_modules/amplitudejs/dist/amplitude.js
.
Option 3: Manual download
Download the amplitude.js
file from our releases page and include the file manually with your project.
Amplitude.js is now available for use! All that's left is initializing →.