> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/topicos/atrair/landing-page/landing-page-como-injetar-parametros-de-uma-url-de-lp-em-um-iframe-da-mesma-lp.md).

# Landing Page - Como Injetar Parâmetros de uma URL de LP em um iFrame da Mesma LP

## Na SprintHub, você pode usar iframes na Landing Page, configurar e injetar parâmetros neles de maneira flexível.&#x20;

***

Você já tentou manipular os parâmetros de URL de um iFrame a partir do site principal?

Imagine a seguinte situação: você tem um site (no nosso caso, uma landing page) com a URL `https://meusite.com.br`. Dentro dessa página, existe um iFrame que carrega o conteúdo de outro site, por exemplo `https://segundosite.com.br` — pode ser um vídeo, um formulário ou até outra página qualquer.

Agora, pense no cenário de uma campanha de marketing digital. Você divulga sua landing page usando parâmetros UTM para identificar a origem dos acessos, como neste exemplo:

```
https://meusite.com.br?utm_source=googleAds
```

A questão é: como fazer para que o iFrame, que está carregando `https://segundosite.com.br`, também receba esse mesmo parâmetro `?utm_source=googleAds` na sua URL? Assim, o segundo site também conseguiria capturar a origem da visita.

Já pensou nisso? Vamos explorar como isso pode ser feito:

{% embed url="<https://www.youtube.com/watch?v=bVWNjmNGcgg>" %}

Segue abaixo o código do vídeo para você configurar na sua Landing Page:

```javascript
var search = window.location.search;

var url1 = 'https://site1.com.br'+search;
var url2 = 'https://site2.com.br'+search;

document.getElementById('if1').setAttribute('src', url1);
document.getElementById('if2').setAttribute('src', url2);
```


---

# 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.sprinthub.com/topicos/atrair/landing-page/landing-page-como-injetar-parametros-de-uma-url-de-lp-em-um-iframe-da-mesma-lp.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.
