{ "html": "
\n

Installation

\n

The easiest way to load Raven.js is to load it directly from our CDN. This script tag should\nbe included after other libraries are loaded, but before your main application code (e.g. app.js):

\n
<script src="https://cdn.ravenjs.com/3.20.1/raven.min.js" crossorigin="anonymous"></script>\n
\n
\n

For installation using npm or other package managers, see Installation.

\n
\n\n\n
\n

Configuring the Client

\n

Next you need to configure Raven.js to use your Sentry DSN:

\n
Raven.config('___PUBLIC_DSN___').install()\n
\n
\n

It is additionally recommended (but not required) to wrap your application start using Raven.context.\nThis can help surface additional errors in some execution contexts.

\n
Raven.context(function () {\n    initMyApp();\n});\n
\n
\n

At this point, Raven is ready to capture any uncaught exception.

\n

Once you have Raven up and running, it is highly recommended to check out Configuration\nand Usage.

\n
\n", "link": "https://docs.getsentry.com/clients/javascript/install/", "id": "javascript", "name": "JavaScript" }