1

I have a landing page lead form created in Salesforce Marketing cloud which we're hosting on our Wordpress website via iframe.

Within the lead form we are pushing all new leads to individual campaigns depending on the campaign id which we would like to be dynamic within the URL "www.example.com/?cid=123campaignid". The issue is that because the marketing cloud url for the lead form is added to the iframe and then the url to the page is our website url I cannot figure out how to pull the campaign ID from the website url.

closed as off-topic by EazyE, Vijay Ganji, Lukas Lunow, glls, Himanshu Oct 22 at 22:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions not specific to Salesforce are off-topic here, but can be asked on Stack Overflow." – EazyE, Vijay Ganji, Lukas Lunow, glls, Himanshu
If this question can be reworded to fit the rules in the help center, please edit the question.

2

You'll have to use Javascript to pass the parameter to your iframe:

var loc = window.location.toString(),
    params = loc.split('?')[1],
    iframe = document.getElementById('myIframe');

iframe.src = iframe.src + '?' + params;​​​​​​​​​​​​​​​​

Not the answer you're looking for? Browse other questions tagged or ask your own question.