> 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/en/topics/attract/landing-page/landing-page-how-to-inject-parameters-from-an-lp-url-into-an-iframe-on-the-same-lp.md).

# Landing Page - How to Inject Parameters from an LP URL into an iFrame on the Same LP

## At SprintHub, you can use iframes on the Landing Page, configure and inject parameters into them in a flexible way.&#x20;

***

Have you ever tried to manipulate an iFrame's URL parameters from the main site?

Imagine the following situation: you have a website (in our case, a landing page) with the URL `https://meusite.com.br`. Inside that page, there is an iFrame that loads content from another site, for example `https://segundosite.com.br` — it could be a video, a form, or even any other page.

Now, think about the scenario of a digital marketing campaign. You promote your landing page using UTM parameters to identify the source of the visits, as in this example:

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

The question is: how do you make the iFrame, which is loading `https://segundosite.com.br`, also receive this same parameter `?utm_source=googleAds` in its URL? That way, the second site would also be able to capture the source of the visit.

Have you thought about that? Let's explore how this can be done:

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

Below is the video code for you to set up on your 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/en/topics/attract/landing-page/landing-page-how-to-inject-parameters-from-an-lp-url-into-an-iframe-on-the-same-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.
