# Integrações

## Worpress

para implementar o tag (o script) AgnosticData em todo o seu site Wordpress é simples. Siga os passos abaixo. Basicamente iremos utilizar o hook `wp_head` nativo do CMS.&#x20;

1\) Acessar `functions.php` em  `wp-content/themes/seu-tema`

2\) Crie a função abaixo

```php
function add_agnosticdata_script() {
// Acesse o seu código SDK enviando no cadastro.
// Substituindo MY_ACCESS_KEY e MY_PROJECT_ID por seus dados reais.
 
    ?>
      <!-- Agnostic Data Events -->
      <script>
      !function(){console.log("dv","1.0.3");!async function(t){const e=document.querySelector("[data-script-id='agnosticadsjs']");e&&e.remove();const o=await fetch(t);if(o.ok){const t=await o.text(),e=document.createElement("script");e.dataset.scriptId="agnosticadsjs",e.textContent=t,document.body.appendChild(e)}else console.error("Erro ao carregar o script:",o.statusText)}("https://utils.agnosticdata.ai/v2/?api_key=MY_ACCESS_KEY&project_id=MY_PROJECT_ID&f=webjs")}();
      </script>
      <!-- End Agnostic Data Events -->
          
    <?php
}
```

3\) Implemente em uma *action* `wp_head` logo abaixo da sua função.&#x20;

```php
add_action('wp_head', 'add_agnosticdata_script');
```

**No final temps em** `wp-content/themes/seu-tema/functions.php`

```php
function add_agnosticdata_script() {
// Acesse o seu código SDK enviando no cadastro.
// Substituindo MY_ACCESS_KEY e MY_PROJECT_ID por seus dados reais.
 
    ?>
      <!-- Agnostic Data Events -->
      <script>
      !function(){console.log("dv","1.0.3");!async function(t){const e=document.querySelector("[data-script-id='agnosticadsjs']");e&&e.remove();const o=await fetch(t);if(o.ok){const t=await o.text(),e=document.createElement("script");e.dataset.scriptId="agnosticadsjs",e.textContent=t,document.body.appendChild(e)}else console.error("Erro ao carregar o script:",o.statusText)}("https://utils.agnosticdata.ai/v2/?api_key=MY_ACCESS_KEY&project_id=MY_PROJECT_ID&f=webjs")}();
      </script>
      <!-- End Agnostic Data Events -->
          
    <?php
}

add_action('wp_head', 'add_agnosticdata_script');
```


---

# 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.agnosticdata.ai/agnosticdata.ai-or-documentation/fundamentals/integracoes.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.
