# WordPress

```php
// child theme functions.php, or a code-snippets plugin
add_action('wp_head', function () { ?>
<script>window.doubleagent=window.doubleagent||{q:[],push(){this.q.push(arguments)}};</script>
<script async src="https://cdn.doubleagent.so/v1/doubleagent.js" data-profile="auto"></script>
<?php }, 1);
```

WooCommerce: set `data-profile="ecommerce"`.
