GCLID : Problem to Pass URL parameters from browser to iframe - Answers - Salesforce Trailblazer Community

Hi staff,I can't get the GCLID parameters in an iframe Pardot form. So, When i do that method : Passing Hidden Fields with a Shape iFramed on Your Web website online , it's ok the associated fee is captured in my hidden field.BUT I would not have to hardcode a parameter in my iframe provide, Certainly, the associated fee this is passed to the iframed form is dynamic, it's the google click on on id generated routinely by the use of Google Adwords for each click on on on ad. So, I tested the program : Passing URL parameters from browser to iframe ( https://have the same opinion.salesforce.com/articleView?id=000317377&type=1&mode=1 ) but it surely definitely does now not artwork ! The gclid value isn't captured in my hidden field...My code : var form = 'https://transfer.pardot.com/l/185642/2017-05-16/bt1x4'; var params = window.location.search; var thisScript = report.scripts[document.scripts.length - 1]; var iframe = report.createElement('iframe'); iframe.setAttribute('src', form + params); iframe.setAttribute('width', '100%'); iframe.setAttribute('top', 500); iframe.setAttribute('type', 'text/html'); iframe.setAttribute('frameborder', 0); iframe.setAttribute('allowTransparency', 'true'); iframe.style.border = '0'; thisScript.parentElement.replaceChild(iframe, thisScript); I start to despair :(
Hello community,I can't get the GCLID parameters in an iframe Pardot form. So, When i try this method : Passing Hidden Fields with a Form iFramed on Your Website , it's ok the value is captured in my hidden field.BUT I don't want to hardcode a parameter in my iframe source, Indeed, the value that's passed to the iframed form is dynamic, it's the google click id generated automatically by Google Adwords for each click on ad. So, I tested this method : Passing URL parameters from browser to iframe ( https://help.salesforce.com/articleView?id=000317377&type=1&mode=1 ) but it doesn't work ! The gclid value isn't captured in my hidden field...My code : I start to despair :(Original article