Loading

Force Account Engagement tracking code to load first with an iframed form

Data pubblicazione: Sep 30, 2025
Descrizione
Edge cases require manipulation of the Account Engagement tracking code to force it to load first on a page. Sometimes, the Account Engagement tracking code fires after the iframed form loads, causing issues with first touch tracking, referring source or UTM parameters.

We recommend using the full Account Engagement tracking code when possible and to save this if your website is not capturing Account Engagement tracked activity appropriately.
Risoluzione
**Notes**
- Please work with your IT team to implement.
- This is a workaround and might not work in all cases.

 
First, make sure that your Account Engagement tracking code is placed before the </head> in your HTML.
Default tracking code looks like:
<script type="text/javascript">
piAId = '112233';
piCId = '123';
(function() {
function async_load(){
var s = document.createElement('script'); s.type = 'text/javascript';
s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js';
var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c);
}
if(window.attachEvent) { window.attachEvent('onload', async_load); }
else { window.addEventListener('load', async_load, false); }
})();
</script>
Edit the Account Engagement tracking code to look like this:
<script type="text/javascript">
piAId = '112233';
piCId = '123';
</script>
<script type="text/javascript" src="http://cdn.pardot.com/pd.js"></script>

If placing this code on a page served over HTTPS, use https://pi.pardot.com/pd.js instead of  http://cdn.pardot.com/pd.js
If you're using other tracking codes throughout your site and experiencing similar issues, just change the piAID and piCID with each campaign code. These 2 IDs are found in the tracking code under the Account Engagement campaign (In pi.pardot.com: Marketing > Campaigns > select relevant campaign > View Tracking code. In Account Engagement Lightning: Account Engagement Campaigns tab > select relevant campaign > View Tracking code).
Numero articolo Knowledge

000383435

 
Caricamento
Salesforce Help | Article