Loading
Salesforce Help 사이트 “Help Agent powered by Fin” 도입 안내더 많이 읽기
Tableau 고객 대상: Tableau를 이용하는 고객이 Help 사이트에서 사례(케이스)를 등록할 수 없는 경우의 대체 수단더 많이 읽기
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Account Engagement: passing URL parameters from browser to iframe

게시 일자: Sep 30, 2025
상세 설명

NOTE: This is an advanced topic and requires JavaScript. Troubleshooting custom script is outside of Account Engagement Support's scope, so proceed with caution.

When you place an Account Engagement form on a webpage using an iframe, the parent page's URL parameters are not automatically passed to the iframe. This can cause issues with Google Analytics and first-touch reporting. Good news is that there is a relatively easy fix for this that uses just a little bit of JavaScript. This method makes an iframe load with the same parameters of the parent page. For example, you could use this script to capture UTM parameters or pre-fill iframed forms.

솔루션

Insert the following code on your webpage. Be sure to replace both instances of PARDOT_FORM_URL with your form's URL.

<noscript>
 <iframe src="PARDOT_FORM_URL" width="100%" height="500" type="text/html" frameborder="0" allowTransparency="true" style="border: 0"></iframe>
</noscript>

<script type="text/javascript">
 var form = 'PARDOT_FORM_URL';
 var params = window.location.search;
 var thisScript = document.scripts[document.scripts.length - 1];
 var iframe = document.createElement('iframe');

 iframe.setAttribute('src', form + params);
 iframe.setAttribute('width', '100%');
 iframe.setAttribute('height', 500);
 iframe.setAttribute('type', 'text/html');
 iframe.setAttribute('frameborder', 0);
 iframe.setAttribute('allowTransparency', 'true');
 iframe.style.border = '0';

 thisScript.parentElement.replaceChild(iframe, thisScript);
</script>

Notes

  • Place the script where you want the form to appear.
  • If you want to include multiple iframed forms on the page, place the scripts where you want the forms to appear, and change the form URL.
  • For more, see this related article: Tracking Lead Source in Account Engagement
Knowledge 기사 번호

000383147

 
로드 중
Salesforce Help | Article