# Integrate SDK

## Step 1: Install SDK

Copy-paste the following code into \<head> of your application's root page. Make sure this script is added on all the pages of your website or web app.

```javascript
<script>
    let growlyticsSettings = {
        apiKey: '<api_key>',
        enabled: true
    };
    var g = { input: growlyticsSettings, q: [] };var t=["events.track","user.identify","user.push","showMessage","requestNotificationPermission","cart.sync"];for(let e=0;e<t.length;e++){let s=t[e].split("."),i=function(){g.q.push({a:t[e],p:arguments})};if(s.length>0){let t=s[0],e=s[1];g[t]=g[t]?g[t]:{},g[t][e]=i}else g[s[0]]=i}
    window['Growlytics'] = g;
    (function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"==document.location.protocol?"https://static.growlytics.in":"http://static.growlytics.in")+"/growlytics.sdk.min.js";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(t,c)})();
</script>
```

`growlyicsSettings` method supports following parameters.

| Option  | Type    | Description                                                                   |
| ------- | ------- | ----------------------------------------------------------------------------- |
| apiKey  | string  | Api Key for given project. You can find the api key in project settings page. |
| enabled | boolean | Enable/disable growlytics sdk.                                                |

## Step 3: Further Integrations

For further integrations, please refer to individual sections.

{% content-ref url="/pages/P4Mo0cNPfiRBHgnBha4P" %}
[Track Events](/integration/browser/installation-1.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LIG-CFi-31xRcMDqK-O" %}
[Track Users](/integration/browser/identify-customers.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LuffrfIaxapsz5VPhL-" %}
[Web Push Notifications](/channels/web-push-notifications.md)
{% endcontent-ref %}


---

# 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.growlytics.in/integration/browser/installation.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.
