Salesforce is well-known for developing a platform that provides a 360 view of the customer so that you can stay connected to your clients in every way.
Building your website or hosting pages on Experience Cloud is one way to keep a single source of truth to all areas of the Client. If you have Pardot and wish to build pages or your website on Experience Cloud, this is how you can embed Tracking Code as well as your Pardot forms without using Form Handlers:
Adding Tracking Code to your Communities-built website:
You can find these settings by going to Salesforce Setup / Digital Experiences / All Sites and clicking on Builder for your Site.
- Copy tracking code from your campaign
- Communities → settings → Security
- Scroll down to CSP (Content Security Policy)
- Select “Allow Inline Scripts Access to Whitelisted Third-party Hosts”
- Settings → Advanced
- Scroll down to Head Markup → Click “Edit Head Markup”
- Paste the Pardot Tracking Code
- Settings → Security
- Scroll down to CSP errors
- If there are any errors on Pardot resources, whitelist these URLs
Adding and embedding a Pardot Form to Experience Cloud Pages:
- Set up Tracker Domain in Pardot
- Copy the verified URL for the Tracker Domain in Pardot
- Setup → CSP Trusted Sites
- Click on New → Add Details and paste the URL
- Navigate to Experience Cloud Page(s), open the desired page
- In a new tab, create a form and copy the Code
- In Experience Cloud, open the correct page → Add HTML Editor” Component
- Paste Pardot iFrame Code into the Component
Happy integrating Experience Cloud Pages with Pardot, Trailblazers. Leave a comment below if there are any other tricks you came across whilst embedding these Pardot codes.