# JavaScript Tag

{% hint style="warning" %}
Variables throughout this documentation are denoted with brackets. For example: '\<name>'. You must provide this information from your application **without** the brackets. For example: 'Peter Gibbons'.
{% endhint %}

To initialize the JavaScript tag, paste this code before the closing body tag on your website. You can retrieve your project’s public key in [Settings](https://app.crowdpower.io/settings).

```javascript
<cp-root></cp-root>
<script>
  window.cp=window.cp||function(){(cp.q=cp.q||[]).push(arguments)};
  window.cp('init', '<project_public_key>');
</script>
<script async src="https://tag.crowdpower.io/js/app.js"></script>
```

Once the JavaScript tag is installed, you will be able to send customer data to CrowdPower using the methods outlined in the following pages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.crowdpower.io/getting-started/javascript-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
