---
title: "addPersonalize"
slug: "cloud-sdk-personalize-browser-addpersonalize"
abstract: "The addPersonalize function initializes the Cloud SDK personalize package on the browser side."
---
# addPersonalize

|     |     |
| --- | --- |
| Type | Function |
| Import path | `@sitecore-cloudsdk/personalize/browser` |

Used as a method by the [`CloudSDK`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-core/cloud-sdk-core-browser/functions/cloud-sdk-core-browser-cloudsdk.html "CloudSDK") function to initialize the `personalize` package.

## Signature

```typescript
export function addPersonalize(
  settings?: BrowserSettings
): CloudSDKBrowserInitializer
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `settings` | [`BrowserSettings`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize/cloud-sdk-personalize-browser/functions/cloud-sdk-personalize-browser-addpersonalize.html#UUID-18ba8f2c-2b03-611f-9ff0-2c57880ceb3b_section-idm19072570850413056 "BrowserSettings properties") | Optional.<br><br>Initialization settings for the package. |

### `BrowserSettings` properties

| Name | Type | Description | Value |
| --- | --- | --- | --- |
| `enablePersonalizeCookie` | `boolean` | Optional.<br><br>Whether to set the `sc_{SitecoreEdgeContextId}_personalize` cookie from the browser side.<br><br>If using only the `browser` module of the `personalize` package, set to `true`.<br><br>If using both the `browser` and the `server` modules of the `personalize` package, set `enablePersonalizeCookie` to `true` either on the browser or the server, and set to `false` on the other.<br><br>If [`enableBrowserCookie`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-core/cloud-sdk-core-browser/functions/cloud-sdk-core-browser-cloudsdk.html "CloudSDK") is `false`, `enablePersonalizeCookie` will not be set.<br><br>Default: `false`. | `true` |
| `webPersonalization` | `boolean \| { async: boolean; defer: boolean; language?: string }` | Optional.<br><br>Whether to enable web personalization.<br><br>If `true`, a web personalization script will load in your app with async but without defer.<br><br>To customize the loading of the script, set the value to an object, and in the object, use the `async`, `defer`, and `language` attributes.<br><br>Default: `false`. | `true` |

> [!note]
> The `language` attribute was added to the `addPersonalize` method's `webPersonalization` property in Cloud SDK 0.5.6 to support languages for web personalization.

## Return value

Initializes the `personalize` package and returns an instance of `CloudSDKBrowserInitializer`.

## Examples

See code examples in [`CloudSDK`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-core/cloud-sdk-core-browser/functions/cloud-sdk-core-browser-cloudsdk.html "CloudSDK").