How to Audit Dynamic Content and Variable Tag Usage with the Pardot API

How to Audit Dynamic Content and Variable Tag Usage with the Pardot API

How to Audit Dynamic Content and Variable Tag Usage with the Pardot API

min. reading

Incorporating dynamic content and variable tags is an excellent way to personalize your emails, forms, and landing pages. But viewing where dynamic content and variable tags are in use is a proverbial black hole. 

Not knowing where these items are used makes updating or deleting dynamic content and fields risky. You don’t want to leave a big blank space in an email template or send a prospect an email that says “We would like to offer you              for a limited time.”

Completing an audit can reveal all the places Pardot Variable Tags and Dynamic Content are in use. So, where do you start?

How we completed the Pardot Dynamic Content and Variable Tag audit

To solve this issue, I teamed up with the Pardot API Wizard Mike Creuzer to see what information we can pull via the API. With the API, Creuzer pulled the asset IDs and the full HTML (and TEXT for email templates) from the assets. We then took the raw data and looked for anything containing “%%” (or “{{“ if you are using HML). The end result being a giant Excel sheet like this:

Pardot Dynamic Content and Variable Tag audit

Using skills from the Excel for Pardot Admins mini-series, we then split this list out into one master list of all Pardot Dynamic Content and Variable Tags present in any assets. This allowed us to not only view which dynamic content assets are more frequently used, but also ensure we would not break any personalization in our assets while altering or deleting fields and content.

Getting technical with ad hoc reporting in Pardot

To get the data in the format above, we used the typical computer science ETL (Extract, Transform, Load) pattern at a smaller scale.

Extract

In this scenario, we had to go beyond what a typical Pardot export would get us, so we turned to the Pardot API. Using the API we pulled the full HTML and TEXT from all unarchived email templates in the Pardot instance. 

If you are new to using the Pardot API, you can shorten your ramp-up time with the Postman Collection for the Pardot API from Sercante Labs.

Transform

We used a regular expression to pull only the HML, PML, and dynamic content merge fields. This allows us to quickly skim the HTML and TEXT of our email templates and identify where dynamic content and/or variable tags are in use. We effectively tossed away all the other ‘stuff’ in the emails to focus on just the needed bits.


Load

“Load” means getting the data to its final destination. In our case, the destination is a shareable and usable spreadsheet. 

We included useful fields within our spreadsheet for people who are doing the dynamic content and variable tag review (i.e. template name, Pardot business unit, etc.). And there are seemingly useless bits like the template ID, which anyone can easily use to create a direct link to the template for editing. 

We also built in additional features, such as flagging when a TEXT version of an email is blank or where an @ symbol was used before %%current_year)yyyy% instead of ©. Finally, we pulled this process together in a programmed script to allow us to easily re-pull the data after dynamic content and fields were deleted, thus ensuring no tags were missed.

Audit your Pardot Dynamic Content and Variable Tags, and tell us how you did

With toolsets like this at your disposal, you can quickly and accurately get more work done. It’s easy to expand this process into other use cases after you’ve completed the process once or twice. For example, you can look for variable tags within dynamic content. 

What Pardot data would you like to audit with a process like this? Tell us in the comments!And remember to reach out to the Sercante team when the challenge calls for Pardot experts.

Subscribe to The Spot

This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is for validation purposes and should be left unchanged.

Upcoming Salesforce Events

Salesforce Training Courses

Categories

Top 5 Recent Posts

  • Erin Duncan is the Account Engagement Product Director at Sercante. Erin is 8x Salesforce certified and has 12+ years of experience as a Salesforce and Account Engagement Admin. She is the leader of the Atlanta B2B Marketers User Group, the leader of the Pardashian Slack group, and a Salesforce Marketing Champion.

Leave Your Comment

Related Articles

Bot Single Post