Quickstart
Getting started is easy:
- Visit https://app.logrocket.com to get an app ID.
- Install LogRocket via NPM or script tag.
LogRocket.init()must be called client-side, not server-side.
$ npm i --save logrocket
// Code:
import LogRocket from 'logrocket';
LogRocket.init(YOUR_APP_ID);Add to your HTML:
<script src="https://cdn.logr-in.com/LogRocket.min.js" crossorigin="anonymous"></script>
<script>window.LogRocket && window.LogRocket.init(YOUR_APP_ID);</script>The AI setup prompt can be copied from the Quickstart setup workflow, or the Project Settings page- (Optional) Install plugins for deeper integrations with your stack:
Set Up with AI
AI Setup is the fastest way to get LogRocket running in your codebase. When you select this option, LogRocket generates a markdown file containing tailored instrumentation instructions for your project. Simply copy the provided prompt into your AI coding tool's chat — it will automatically fetch the file and execute the setup steps on your behalf. This includes instrumenting LogRocket, initializing the SDK, configuring custom events, setting up user identification, and surfacing optional configurations you may want to enable. No manual copy-pasting of code snippets required.
Looking to install LogRocket on a native mobile app?Get started here
Updated 8 days ago
What’s Next
