How to integrate CMSKite into this project
get_integration_guideReturns install steps, files, and key placement to connect a project to CMSKite, so view tracking works before you hand-write integration code.
Instructions
The official way to connect a project to CMSKite. For JavaScript and TypeScript that is the cmskite package; for PHP, WordPress, Laravel, Python or a plain HTML site it is the raw HTTP calls, which need no dependency at all. Returns what to install if anything, the files to write, and which key belongs on the server versus in the browser. Call this BEFORE writing any integration code by hand: hand-rolled fetch wrappers miss view tracking entirely, so the customer gets a working site with no analytics and no indication that anything is missing. Finish by calling check_integration, which is the only thing that can tell a working integration from one that silently reports nothing. Does not read or change anything in CMSKite.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| framework | Yes | What the project is. Look at the files rather than guessing. JavaScript: `next` in package.json with an app/ directory is `nextjs-app` (`nextjs` is accepted as the same thing), `next` with pages/ is `nextjs-pages`, `react` without `next` is `react`, a package.json with no framework is `node`. Not JavaScript: .html files and no build step is `html`; wp-config.php or a wp-content/ directory is `wordpress`; artisan and composer.json with laravel/framework is `laravel`; any other .php is `php`; requirements.txt, pyproject.toml or .py is `python`. Use `other` for anything else and the answer is the raw HTTP calls, which work in every language. | |
| projectId | No | The CMSKite project id, as `prj_...`, if one already exists. | |
| includeAnalytics | No | Include view and click tracking. Defaults to true; there is rarely a reason not to. |