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

## In 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 the URL parameters of an iFrame 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 the content of another site, for example `https://segundosite.com.br` — it can be a video, a form, or even any other page.

Now, think about the scenario of a digital marketing campaign. You publicize your landing page using UTM parameters to identify the source of visits, like 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 that same parameter `?utm_source=googleAds` in its URL? This way, the second site could also 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 code from the video for you to configure 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: 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.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>
```

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.
