# How To Install Mixpanel

> To install Mixpanel, select the JavaScript snippet from the Mixpanel documentation, paste it before the closing head tag on your webpage, and initialize it with your Project Token retrieved from your project settings to enable page view tracking.

Canonical: https://livedemo.ai/tutorials/how-to-install-mixpanel/
Apps: Mixpanel
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4014ab56e05a00fe825e/preview?step=1

## Steps

1. Mixpanel can be installed in a variety of ways based on which underlying technology your project currently uses. It is recommended to visit the mixpanel docs for an in-depth guide for each method. For the purpose of this demo we will be demonstrating the simplest of them all, a vanilla Javascript installation.
2. Visit the mixpanel docs and locate the Quickstart section. Under Code , select Javascript to view snippets.
3. Copy the code snippet from the code space or using the small copy button .
4. Paste this snippet on your webpage before the head tag closes (before </head>).
5. Now, head inside mixpanel to retrieve your Project Token . This is found under your Project Settings Overview under Access Keys .
6. Within the same head tag, we will be initializing mixpanel and enabling page views tracking. To do so, add the following line of code inside a script tag: mixpanel.init('PROJECT_TOKEN', track_pageview: true); Save these changes in your editor.
7. Mixpanel is now installed on your project and is being tracked. Visit the mixpanel dashboard to view statistics.
