# Javascript Web SDK

The Javascript Web SDK is a way to interact with the iAdvize solution from the client side.

## Safely accessing the iAdvize object <a href="#safely-accessing-the-iadvize-object" id="safely-accessing-the-iadvize-object"></a>

If the iAdvize tag was installed using the recommended script (see <https://ha.iadvize.com/admin/site/current/code>), a global `window.iAdvizeInterface` should be available. You can safely push functions inside `window.iAdvizeInterface` : they are guaranteed to be executed once the iAdvize tag is fully loaded.

```javascript
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.push(function(iAdvize) {
  // Ex : accessing the tag version
  const tagVersion = iAdvize.get('tag:version');
});
```
