Pardot Salesforce Lead Activities

Trying to integrate Pardot with Salesforce. Specifically, I’d like to show the Lead Activities on the lead page. I can get the iframe to work, but no content is populating.

Below is the Visualforce Page code. Having toruble getting the {!$Api.Partner_Server_URL_90} into the iframe.

<b>VISUALFORCE CODE:</b>
<pre><apex:page standardcontroller="Lead" showHeader="false" sidebar="false" standardStylesheets="false">
 Body { Background: transparent; }
 </style>
 <apex:iframe src="https://pi.pardot.com/prospect/activity/email/{!URLENCODE(Lead.Email)}?sessionid={!$Api.Session_ID}&amp;serverurl={!$Api.Partner_Server_URL_90}&amp;source=salesforce&amp;tab=lead&amp;style={!$User.UIThemeDisplayed}" scrolling="false" height="390" id="prospect_insight"/>
</apex:page>
``` ```

<b>MY IFRAME</b>
<iframe src="https://pi.pardot.com/prospect/activity/email/{!URLENCODE({{{Email}}}?sessionid={{{$Model.session.data.0.Id}}}&amp;<b>serverurl={{!$Api.Partner_Server_URL_90}}</b>" width="100%" height="500" id="prospect_insight" ></iframe> 

Hi Mansour, I was able to accomplish this using an iframe in a Skuid template component with a slightly different URL:

<iframe src="https:&#47;&#47;pi&#46;pardot&#46;com/prospect/activity/email/{{{Email}}}" width="100%" height="500"></iframe>

Here’s the XML for this sample page below. Is this helpful for you?

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Lead"> <models> <model id="Lead" limit="1" query="true" createrowifnonefound="false" sobject="Lead"> <fields> <field id="FirstName"/> <field id="LastName"/> <field id="Company"/> <field id="CreatedDate"/> <field id="Email"/> <field id="Pardot_ID__c"/> </fields> <conditions> <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/> </conditions> <actions/> </model> </models> <components> <pagetitle model="Lead"> <maintitle> <template>{{FirstName}} {{LastName}} {{Company}}</template> </maintitle> <subtitle> <template>{{Model&#46;label}}</template> </subtitle> <actions> <action type="delete"/> <action type="clone"/> <action type="share"/> <action type="savecancel" window="self"/> </actions> </pagetitle> <tabset rememberlastusertab="true" defertabrendering="true" renderas=""> <tabs> <tab name="Profile"> <components> <basicfieldeditor showsavecancel="false" showheader="true" model="Lead" mode="read" buttonposition="" layout=""> <columns> <column width="50%"> <sections> <section title="Basics"> <fields> <field id="FirstName"/> <field id="LastName"/> <field id="Company"/> </fields> </section> </sections> </column> <column width="50%"> <sections> <section title="System Info"> <fields> <field id="CreatedDate"/> </fields> </section> </sections> </column> </columns> </basicfieldeditor> </components> </tab> <tab name="Pardot Activities" loadlazypanels="true"> <components> <template multiple="false" model="Lead" allowhtml="true"> <contents>&amp;lt;iframe src="https:&#47;&#47;pi&#46;pardot&#46;com/prospect/activity/email/{{{Email}}}" width="100%" height="500"&amp;gt;&amp;lt;/iframe&amp;gt;</contents> </template> </components> </tab> </tabs> </tabset> </components> <resources> <labels/> <css/> <javascript/> </resources> </skuidpage>

Will try it today.
Thanks!

No problem! Sorry for the delay in responding.

I’ve also had fun using the Pardot fields on the Lead record to create visualizations for our marketing team.

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Lead"> <models> <model id="Lead" limit="" query="true" createrowifnonefound="false" sobject="Lead" doclone="" type="aggregate" orderby=""> <fields> <field id="Id" name="countId" function="COUNT"/> </fields> <conditions> <condition type="fieldvalue" field="pi__created_date__c" operator="gte" inactive="true" enclosevalueinquotes="false" name="__autofilter__start__pi__created_date__c" state="filterableoff" value=""/> <condition type="fieldvalue" field="pi__created_date__c" operator="lte" inactive="true" enclosevalueinquotes="false" name="__autofilter__end__pi__created_date__c" state="filterableoff" value=""/> <condition type="blank" value="null" field="pi__conversion_object_name__c" operator="!=" enclosevalueinquotes="false" state="filterableon" inactive="false" name="notnull"/> </conditions> <actions/> <groupby method="simple"> <field id="pi__conversion_object_name__c" name="piconversionobjectnamec"/> </groupby> </model> <model id="AllLeads" limit="5000" query="true" createrowifnonefound="false" sobject="Lead" doclone="" type="" orderby="CreatedDate DESC"> <fields> <field id="Id"/> <field id="CreatedDate"/> <field id="IsConverted"/> <field id="pi__created_date__c"/> </fields> <conditions> <condition type="fieldvalue" value="2014-01-01T05:00:00.000+0000" enclosevalueinquotes="false" field="CreatedDate" operator="gte"/> <condition type="blank" value="null" field="pi__created_date__c" operator="!=" enclosevalueinquotes="false" state="filterableoff" inactive="true" name="pi__created_date__c"/> </conditions> <actions/> </model> </models> <components> <tabset rememberlastusertab="true" defertabrendering="true" renderas="lefttabs" sidebarwidth=""> <tabs> <tab name="Leads over Time" loadlazypanels="true"> <components> <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="all" createrecords="false" model="AllLeads" buttonposition="" mode="readonly" emptysearchbehavior="query"> <fields/> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <searchfields/> <renderconditions logictype="and"/> <filters> <filter type="toggle" filteroffoptionlabel="New Filter" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="auto" label="Only Pardot"> <effects> <effect action="activate" value="" condition="pi__created_date__c"/> </effects> </filter> </filters> </skootable> <skuidvis__chart model="AllLeads" maintitle="Total {{Model.labelPlural}} vs Converted {{Model.labelPlural}}" type="spline"> <dataaxes> <axis id="Lead" title="Number of Leads" minvalue="0" integersonly="true"/> </dataaxes> <categoryaxes> <axis id="categories" categorytype="field" field="CreatedDate" title="" fillvals="true" dategranularity="calmonth"> <allowedgranularities> <type>calquarter</type> <type>calyear</type> </allowedgranularities> </axis> </categoryaxes> <serieslist> <series valuefield="Id" splittype="field" aggfunction="count" splitfield="IsConverted"/> </serieslist> <colors> <value>#81d4fa</value> <value>#4dd0e1</value> <value>#26a69a</value> <value>#259b24</value> <value>#039be5</value> <value>#0097a7</value> <value>#00695c</value> <value>#72d572</value> <value>#4fc3f7</value> <value>#26c6da</value> <value>#009688</value> <value>#0a8f08</value> <value>#0288d1</value> <value>#00838f</value> </colors> <legend layout="horizontal" halign="center" valign="bottom"/> <allowedtypes> <type>line</type> </allowedtypes> <renderconditions logictype="and"/> </skuidvis__chart> </components> </tab> <tab name="Landing Pages"> <components> <panelset type="custom" scroll=""> <panels> <panel width="50%"> <components> <pagetitle model="Lead"> <maintitle>Landing Page Performance</maintitle> <actions/> </pagetitle> <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="true" pagesize="25" createrecords="false" model="Lead" buttonposition="" mode="readonly" emptysearchbehavior="query"> <fields> <field id="pi__conversion_object_name__c" name="piconversionobjectnamec" valuehalign="" type="" columnwidth="70%" allowordering="true"> <label>Landing Page</label> </field> <field id="Id" name="countId" valuehalign="right" type="" allowordering="false"> <summaries> <summary>sum</summary> </summaries> <label>Total Leads</label> </field> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <exportproperties usetablecolumns="true"/> <searchfields/> <filters> <filter type="daterange" filteroffoptionlabel="New Filter" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="auto" labelmode="auto" conditionfield="pi__created_date__c"/> <filter type="toggle" filteroffoptionlabel="New Filter" createfilteroffoption="true" affectcookies="false" autocompthreshold="25" conditionsource="manual" labelmode="auto" label="Show Null"> <effects> <effect action="deactivate" value="" condition="notnull"/> </effects> </filter> </filters> <renderconditions logictype="and"/> </skootable> </components> </panel> <panel width="50%"> <components> <skuidvis__chart model="Lead" maintitle="Battle of the Landing Pages" type="donut"> <dataaxes> <axis id="axis1"/> </dataaxes> <categoryaxes> <axis id="categories"/> </categoryaxes> <serieslist> <series valuefield="countId" splittype="field" splitfield="piconversionobjectnamec"/> </serieslist> <colors> <value>#b39ddb</value> <value>#7986cb</value> <value>#738ffe</value> <value>#03a9f4</value> <value>#5e35b1</value> <value>#303f9f</value> <value>#3b50ce</value> <value>#81d4fa</value> <value>#9575cd</value> <value>#5c6bc0</value> <value>#5677fc</value> <value>#039be5</value> <value>#512da8</value> <value>#283593</value> </colors> <legend layout="off" halign="center" valign="bottom" showlabels="false"/> <allowedtypes> <type>pie</type> <type>donut</type> </allowedtypes> <renderconditions logictype="and"/> </skuidvis__chart> </components> </panel> </panels> </panelset> </components> </tab> </tabs> </tabset> </components> <resources> <labels/> <css/> <javascript/> </resources> </skuidpage>

Anna,

I tried your iframe and it works… but on the initial load the iframe (Pardot Activities) load with no rows. However, if you change the Type filter, then go back to “All Types,” the data loads.

This behavior does not happen in the standard Salesforce page layout with the Visualforce page on the page.

Any idea why this might be?

(By the way, the Pardot UI has changed a bit recently, I think.)