> For the complete documentation index, see [llms.txt](https://docs.iadvize.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iadvize.dev/technologies/web-and-mobile-sdk/javascript-web-sdk/guides.md).

# Guides

## "idzCustomData" is deprecated

You want to update your implementation, or you've noticed a warning in your browser console indicating that your iAdvize "Custom Data" implementation is outdated?

Don't worry, simply follow this guide, which will walk you through, step by step, how to adapt your implementation with practical examples.

{% hint style="warning" %}

## For Google Tag Manager users

If you see a deprecation message in your console related to Custom Data and you're using **Google Tag Manager** to deploy iAdvize on your website, you don't need to follow this guide.\
Simply make sure you're using the latest versions of the **iAdvize tags** available in the **Community Gallery**: <https://tagmanager.google.com/gallery/#/?filter=iAdvize>
{% endhint %}

### Before (old implementation)

* You had to create a `idzCustomData` object within the global window object.
* When you wanted to add data, you had to make sure to update your existing object rather than overwrite it.
* You were required to set your Custom Data **BEFORE** the main iAdvize tag was loaded, which could be restrictive in some situations or cause race condition issues.
* If you wanted to update a custom data value or add a new one **AFTER** the iAdvize tag had loaded, you were stuck...

#### Example

```html
<script>
window.idzCustomData = {
  product_id: "my_product_id_001"
};
</script>
```

### Now (current implementation)

* You no longer need to worry about the loading order of your custom data relative to the main tag.
* You can safely update or add to your custom data without risking overwriting previously stored information.

#### Example

```html
<script>
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.push(function(iAdvize) {

  iAdvize.set("customData", {
    product_id: "my_produc_id_001"
  });
  
});
</script>
```

If you need to add another Custom Data, you can simply call the method again:

```html
<script>
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.push(function(iAdvize) {

  iAdvize.set("customData", {
    product_id: "my_produc_id_002",
    page_type: "product_detail"
  });
  
});
</script>
```

You can [read the documentation](/technologies/web-and-mobile-sdk/javascript-web-sdk/reference.md#custom-data-usage-examples) to learn more about Custom Data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.iadvize.dev/technologies/web-and-mobile-sdk/javascript-web-sdk/guides.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
