Question from user:
I want to be able to track revenue for ad clicks in pardot and salesforce (I am using connected campaigns), for when a visitor first becomes a prospect by filling out a form on the website.
An example customer path would be as follows:
- Visitor clicks on the ad (google, banner, facebook, etc.)
- Visitor is directed to the website
- Visitor fills out a form on the website (that is connected to a form handler) and converts into a prospect
- Prospect/Lead converts to an opportunity
What would be the best way to be able to track the revenue generated by this ad?
One option I thought about was using a custom redirect, with a completion action to add the prospect to the connected campaign in SF, however, completion actions are not retroactive and do not work on visitors, so it doesn’t add the prospect/lead to the campaign unless the prospect clicks the custom redirect link again.
One other way I thought about going was through landing pages and embedding the form handler on the landing page, but I have never used this approach and wasn’t sure how much development work this would take on the website to be able to set up this infrastructure, especially if we wanted to have separate ones for each ad campaign.
Any help would be greatly appreciated! Thanks in advance!
Answer from Nabil:
That’s a great question, and you’ve already identified the key challenges with the out-of-the-box Pardot features for a first-touch scenario like ad clicks.
You’re right that a Custom Redirect’s completion action won’t work for a brand new visitor who hasn’t been cookied as a prospect yet, and the landing page/form handler approach, while better for campaign association, requires significant setup for every ad campaign.
The most robust and future-proof way to handle this full-funnel, multi-channel ad revenue tracking and attribution, especially in a world with increasing restrictions on third-party cookies and client-side tracking, is through a server-side tracking and API-driven approach that pushes conversion and revenue data directly to the platforms.
This moves the complexity away from your website’s forms and into a dedicated data infrastructure.
Instead of relying on the client-side Pardot tracking code to retroactively associate a visitor’s first touch (the ad click) to their eventual form submission (conversion) and then to the Opportunity revenue, a better solution involves a centralized data layer and APIs.
Here’s how that advanced solution works:
You can use a platform like Google Tag Manager (GTM) on your website to manage all tracking tags.
When a visitor clicks an ad and lands on your site, GTM is used to capture crucial first-party data like the Google Click ID (gclid
), Facebook Click ID (fbclid
), and LinkedIn Click ID (if applicable) from the URL parameters and store them in a secure first-party cookie.
When the visitor fills out your form handler and converts into a prospect, the form submission pushes a conversion
event to a server-side tagging environment, such as one built on a platform like Stape (a Google Tag Manager server-side container provider) or Google Cloud Platform.
This server-side instance is crucial because it acts as a secure intermediary and has access to the stored first-party click IDs and prospect information (like email).
This server-side environment then uses the specific advertising platform’s Conversions API – such as the Facebook Conversions API, Google Ads API, or LinkedIn Conversions API – to directly send the conversion
event to the advertising platform.
This method is highly reliable and provides the ad platforms with the necessary data to optimize campaigns and attribute the conversion to the original click, bypassing many client-side tracking limitations.
Simultaneously, you can use the same server-side event to trigger an action via the Salesforce API or the Salesforce Account Engagement API to find or create the prospect in Salesforce/Pardot.
Crucially, you would pass the original advertising campaign information (e.g., the UTM parameters or the specific campaign name associated with the ad) along with the prospect data.
This ensures the prospect’s record is immediately and correctly associated with the correct Salesforce Campaign (which you’ve connected to Pardot), accurately setting the first touch attribution campaign in Salesforce.
When the Prospect/Lead eventually converts to an Opportunity and the deal closes as “Closed Won,” a Salesforce Flow or trigger can use the Salesforce API to send an offline conversion event back to the respective advertising platform’s API (e.g., Google Ads API, Facebook Conversions API) containing the revenue amount and the original click ID that was stored on the Lead/Contact record.
This full-circle, API-driven approach ensures accurate, multi-touch revenue attribution in Salesforce using Connected Campaigns and provides the ad platforms with the necessary conversion and revenue data for effective ad optimization and ROI reporting, offering a far more reliable solution than trying to force the Custom Redirect completion action to work retroactively or managing countless ad-specific form handlers.