Implementing Multiple Account Engagement (Pardot) Tracking Codes on One Website
- June 26, 2023
- Pardot Tracker Domains, Pardot Website Tracking, Salesforce Ben | The Drip
For businesses that use Account Engagement (Pardot), tracking their website visitor activity is important. Beyond simply capturing the number of visits and unique visitors, the ultimate goal would be to get information on the pages the visitor visits and interacts with, and subsequently, register that information once that visitor turns into a prospect (i.e. converts).
Unfortunately, this becomes a challenge if you have just one website but multiple Account Engagement (Pardot) accounts, because it does not seem possible to have more than one tracking code running at the same time. However, there is a way to inject two or more Pardot tracking codes into a single script, even though this is not presently a standard feature! Here’s how…
Multiple Tracking Codes, One Website
The two key issues at play here are:
- The official documentation on implementing tracking codes to track visitor and prospect activity only covers implementing one code per webpage.
- It is known Javascript behaviour that when two working tracking codes are put together, it seems to trigger a script conflict because of the duplication in variables, functions, or event-handler access, causing one or both scripts to become invalid.
For more context, see this post on the IdeaExchange requesting the feature become available to all Account Engagement (Pardot) customers.The only way to do this would be to use a custom script where the different tracking code scripts are consolidated into a single script to mitigate the possibility of the scripts becoming inoperable.
Note: The solution below builds on an original solution shared by Chris Heiden back in 2015, with updates to account for first-party tracking and changes in the default tracking code provided by Account Engagement.
1. Create Tracker Domains For Your Different Accounts
Firstly, you will need to create unique tracker domains that match your website’s domain for each Account Engagement (Pardot) account that you have. This is because each tracker domain can only be validated once, so they cannot be used in more than one account.
Note: Ensure that these subdomains you create are only used as Account Engagement tracker domains.
For example, if The DRIP had three different Pardot accounts, we could consider using the following tracker domains:
- us.thedrip.tech
- europe.thedrip.tech
- asia.thedrip.tech
Alternatively, we could also just slightly modify the tracker domain:
- go1.thedrip.tech
- go2.thedrip.tech
- go3.thedrip.tech
2. Get the Ids From Each Account and Default Campaign
Next, you will need to get the different Pardot Account Ids (piAId), Pardot Campaign Ids (piCid), and Pardot Tracker Domains (piHostnames), to prepare the final script you will implement on your web page.
To do this, you will need to go to Account Engagement Settings → Domain Management → Tracking Code Generator. You will need the details in the highlighted section below for each of the Pardot accounts you are dealing with for your business.
Note: If your piCid is blank, choose a campaign in the Override Default Campaign section and the tracking code will be refreshed accordingly.
3. Modify the Javascript Code and Implement It
Lastly, you will need to consolidate the different Ids and tracker domains into a single script. This will ensure that each time your web page and the script load, it will call out to the multiple Ids correctly.
Here is an example of what the script will look like:
piAId = '123456';
piCId = '56789';
piHostname = ''go1.thedrip.tech”;
piTracker();
piAId = '234567';
piCId = '67890';
piHostname = ''go2.thedrip.tech”;
piTracker();
Then, you can go forth and implement this modified code on your web pages.
Note: The function piTracker(), which is loaded in the default tracking code, is responsible for sending page visits to Account Engagement. Be sure to leave it in the code!
Potential Risks
As with any custom solution or workaround, there are a few risks, outlined below:
1. You Will Not Be Able to Get Account Engagement (Pardot) Support
If you plan to implement this on your own, you risk not being able to get any support from the Pardot Support Team, as this custom code is considered out of scope.
2. It May Not Work With Google Tag Manager
If you use Google Tag Manager, changing the standard tracking code provided by Account Engagement (Pardot) may render the code “invalid” in Google Tag Manager because there are duplicate piAIds and piCIds in the custom solution outlined above. You may need to implement the script directly on the web page to ensure that it runs as expected, if you are not able to get past Google Tag Manager’s error messages.
See here for the official documentation on Using Google Tag Manager with Account Engagement.
Summary
If your company has multiple Account Engagement (Pardot) accounts, you may need to implement multiple Pardot Tracking Codes into a single website to facilitate the tracking of your website visitors. While it may seem like a big effort, it is justified considering how beneficial and crucial website tracking is to the business. Hopefully now you will be able to achieve this!
This Pardot article written by:
Salesforce Ben | The Drip
Lucy Mazalon is the Head Editor & Operations Director at Salesforceben.com, Founder of THE DRIP and Salesforce Marketing Champion 2020.
Original Pardot Article: https://www.salesforceben.com/the-drip/implementing-multiple-account-engagement-pardot-tracking-codes-on-one-website/
Find more great Pardot articles at www.salesforceben.com/the-drip/
Pardot Experts Blog
We have categorized all the different Pardot articles by topics.
Pardot Topic Categories
- Account Based Marketing (ABM) (7)
- Business Units (14)
- ChatGPT / AI (3)
- Completion Actions (5)
- Connectors (10)
- Custom Redirects (4)
- Data Cloud (2)
- Demand Generation (8)
- Dynamic Content (6)
- Einstein Features (12)
- Email Delivery (17)
- Email Open Rates (3)
- Pardot A/B Testing (2)
- Email Mailability (16)
- Do Not Email (1)
- Double Opt-in (2)
- Opt Out / Unsubscribe (14)
- Email Preferences Page (6)
- Engagement Studio (16)
- Industries (1)
- Non Profit (1)
- Landing Pages (9)
- Lead Generation (1)
- Lead Management (13)
- Lead Routing (3)
- Lead Scoring (16)
- Leads (3)
- Marketing Analytics – B2BMA (9)
- Marketing Automation (1)
- Marketing Cloud (3)
- Marketing Cloud Account Engagement (4)
- Marketing Cloud Growth (2)
- New Pardot Features (6)
- Opportunities (2)
- Optimization (2)
- Pardot Admin (64)
- Duplicates (1)
- Marketing Ops (1)
- Pardot Alerts (1)
- Pardot API (2)
- Pardot Automations (3)
- Pardot Careers (12)
- Pardot Certifications (4)
- Pardot Consulting (1)
- Pardot Cookies (3)
- Pardot Custom Objects (3)
- Pardot Email Builder (8)
- Pardot Email Templates (9)
- HML (6)
- Pardot Events (16)
- Pardot External Actions (1)
- Pardot External Activities (4)
- Pardot Forms (29)
- Form Handlers (8)
- Pardot Integrations (20)
- Data Cloud (1)
- Slack (1)
- Pardot Lead Grading (5)
- Pardot Lead Source (2)
- Pardot Lightning (1)
- Pardot Migration (1)
- Pardot Nurture / Drip Campaigns (1)
- Pardot Personalization (3)
- Pardot Profiles (1)
- Pardot Releases (18)
- Pardot Sandboxes (2)
- Pardot Segmentation (5)
- Pardot Strategy (7)
- Pardot Sync (2)
- Pardot Sync Errors (1)
- Pardot Tracker Domains (5)
- Pardot Training (3)
- Pardot Vs Other MAPs (4)
- Pardot Website Tracking (2)
- Reporting (22)
- Salesforce and Pardot (31)
- Marketing Data Sharing (2)
- Pardot Users (3)
- Salesforce Automation (5)
- Salesforce Flows (2)
- Salesforce Campaigns (20)
- Salesforce CRM (3)
- Record Types (1)
- Salesforce Engage (3)
- Salesforce Queues (2)
- Security and Privacy (1)
- Tags (3)
- The Authors (504)
- Cheshire Impact (9)
- Greenkey Digital (51)
- Invado Solutions (37)
- Jenna Molby (9)
- Marcloud Consulting (6)
- Nebula Consulting (60)
- Pardot Geeks (44)
- Salesforce Ben | The Drip (235)
- SalesLabX (3)
- Slalom (4)
- Unfettered Marketing (46)
- Uncategorized (1)
- Website Tracking (2)
- Website Search (1)
More Pardot Articles
See all posts
This Pardot article written by:
Salesforce Ben | The Drip
Lucy Mazalon is the Head Editor & Operations Director at Salesforceben.com, Founder of THE DRIP and Salesforce Marketing Champion 2020.
Original Pardot Article: https://www.salesforceben.com/the-drip/implementing-multiple-account-engagement-pardot-tracking-codes-on-one-website/
Find more great Pardot articles at www.salesforceben.com/the-drip/