> 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);
```
