Forget Marketo and HubSpot, it’s Pardot Time

Setup

Initial requirements

Before you get started with running though all the stuff to understand how this integration works, let’s go over what you’ll need to get started (These steps are pretty similar across the MAP integrations).

  1. A Pardot Account
  2. A Wistia account
  3. A video
  4. A web page

Once we’ve got all this stuff, we can run through how to setup your Wistia and Pardot to work in a symphony of marketing automation bliss. This setup guide will serve as the initial auditing steps for someone’s integration, as you should verify that each of these things exists and is configured properly. The beginning will focus on an understanding of what’s going on underneath each of the respective hoods, whereas there will be a set of troubleshooting steps further down.

First step: turn on the integration

Within your Wistia account, you’ll want to go to the integrations section of your Account Settings and select “Pardot” from the list of integrations (it’s near the bottom). Input your Pardot Username, Pardot Password, and Pardot API User Key. The Pardot API User key can be found in the User Information within Pardot.

Tip: Keep in mind that the option to connect will only show if you have a Wistia plan that allows for Marketing Automation Provider (MAP) integrations. If you do not have such a plan, the option to connect will be replaced with a button that says “Upgrade to connect.”

The second thing you’ll need to do is enable the integration from the Pardot side. Within Pardot you can connect your account from the Connectors option in the Admin Menu on the top of the page. On that page you can select Add Connector to hook Wistia up to Pardot. You’ll need an API Token and the Public Token from the API section of your Wistia account’s settings. If you want to see heatmaps (and who doesn’t…), you’ll need to check the show heatmaps option.

Second step: ready your media

Okay – so we already covered that you’ll need a video for this, but we haven’t yet prepared readying that video for prime time. This step is pretty simple, and is something we generally want people to be doing anyway. Within the Timeline Actions portion of Customize for your video, add a Turnstile and make sure the Pardot integration is enabled. Pretty simple.

Fun fact: if you don’t care about capturing emails, the Turnstile step is somewhat optional – your medias will still know that you have the MAP integration and be able to run parts of it without a turnstile. Of course the downside is that you won’t be able to get perfect information since lots of folks will be unidentified and won’t be unified between Pardot and Wistia. That said, some customers only care about the information being put together in Pardot.

Third step: ready your web page

For our web page, there are two things we need to make sure happen: the video gets embedded and the Pardot tracking code is added. You can find instructions on adding the Pardot Tracking Code from Pardot’s docs. The key piece of this is being able to copy the tracking code from your Marketing>Campaigns section of your Pardot portal. That code will look something like this (though it’s slightly different for each Pardot account):

<!-- Start of Pardot Embed Code -->
<script type="text/javascript">// <![CDATA[
	piAId = '#####';
	piCId = '####';

	(function() {
		function async_load(){
			var s = document.createElement('script'); s.type = 'text/javascript';
			s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js';
			var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c);
		}
		if(window.attachEvent) { window.attachEvent('onload', async_load); }
		else { window.addEventListener('load', async_load, false); }
	})();
// ]]></script>
<!-- End of Pardot Embed Code -->

Fourth step: watch your data come in… hopefully

The setup is pretty easy, and our own help page for Pardot covers most of this stuff in a little more detail with some screenshots, so make sure you give that a look!

How it all works

Let’s be honest, this is probably why you’re here. Someone has done all of the setup stuff and it seems right a far as you can tell, but something is off. What is it? A good rule of thumb is to start with asking yourself what you’re missing, or what you don’t know about a scenario. Let’s start by making sure you’ve got a good mental model of how things work under the hood a little bit.

Communicating with HubSpot

Similar to HubSpot, our communications with Pardot are unidirectional. We only really send information to Pardot (sometimes they ask, sometimes we just send it). Unlike the other integrations, there’s a significant portion of the code that lives on Pardot’s side. This means we don’t do as much on the Wistia Side of things compared to the other integrations. The forms that this can take are:

  1. Turnstile Submissions
  2. Heatmap information
  3. Events
Turnstile Sumbissions

This is similar to other email integrations. It will feed the contact into Pardot. It will also associate the viewer’s Wistia Viewer Key and their Pardot User Key within Pardot (NOT Wistia, the association lives in Pardot). This allows Pardot to continue pull the associated data for the viewer from Wistia into Pardot. This is not the only way that a viewer can be associated, though.

Tip: Sometimes, the viewer will already be captured through another method in Pardot. This doesn’t mean that their views can’t be captured, but it does mean that it’s a little more complicated to troubleshoot. So long as Pardot is able to associate the Viewer Key and the User Key, the information should go through properly. For more information, skip down to the troubleshooting section.

Heatmap information

Part of the Pardot integration is displaying heatmaps for views within your Pardot portal. This works by having Pardot leverage our stats API to access heatmaps for sessions. This relies on the viewer key and user key association step succeeding.

Events

In addition to turnstile submissions, Pardot also retrieves events from viewers sessions, such as the percentage watched. This works differently from HubSpot. The code is on their end and they retrieve it via our Stats API.

Troubleshooting

Alright, so now you have a good idea of the inner workings of the integration in addition to how to set it up, let’s walk through some ways to test, troubleshoot and audit a Wistia + Pardot integration. I’ll be going through these by tactic and not by symptom – going back to a tip from before, it’s important to identify what you don’t know, and the answer to that will point you in the direction of which tactics to start with.

Figuring out if your Wistia embed knows that it should have the Pardot Integration and be using it

So, as covered before in the second setup step, part of the integration works without having to worry about turnstiles. Or, well, it’s supposed to. Sometimes it does not, though this is rare. Because these work independently of each other, there are two things you need to check.

  1. The Turnstile Plugin: If the video is supposed to have a turnstile, you should ensure that the plugin is present and knows it should be using Pardot. To do this, you can play around with the player API. Here’s how to check for the Turnstile plugin on a video:
w = Wistia.api("hashed_id") // make sure you're using the hashed id of your video here, not just literally "hashed_id"
w.plugins

This will return a javascript object that contains one entry per plugin. They’re labeled in a hard-to-parse way, but expanding the objects until you can find a pluginName key will help you spot what you’re looking for. Inside that same object, you’ll want to look at its options – inside the options you should see something denoting that it’s using the HubSpot provider. If it doesn’t show that, you might have found the source of your problem!

  1. The Pardot MAP integration: Videos on a page know they’re supposed to be using a MAP integration by looking at the media’s integration data. Similarly to Turnstile, you can double check for its existence by utilizing the javascript console:
w = Wistia.api("hashed_id") // make sure you're using the hashed id of your video here, not just literally "hashed_id"
w.data.media.integrations

This will also return a javascript object, and for each integration on the associated account you’ll see a boolean value. If you want the Pardot integration enabled, the boolean value should be true.

Making sure that communication is being sent to Pardot from the page that the video is on

This is different than HubSpot because so much of the code lives in Pardot. We need to check whether Pardot is associating the viewer key with their user id. Pardot tracks its users through a cookie. If you’re curious to see whether the information for a Pardot User, try typing pi into the browser console. You’ll get a lot of options to return information from Pardot, like piGetCookie().

How can we make sure we’ve tried to send emails captured via Turnstile over to Pardot?

Here’s where things start to get really advanced, since this one will require access to the application console or the production database via Sequel Pro or something. If you have never done this before, pair with someone from the Kodiak Squad, Bobby, or an Advanced Support Specialist to get the info you need. Okay, now that the disclaimer is out of the way, here’s the gist of what you’re going to do: find the CapturedEmail record in the database, verify that it has info that looks reasonable (i.e the fields look okay), and that it has a synced_at date.

Captured emails are a bit weird in that there’s no obvious association that fits them under an account, so you’ve got to search the entire CapturedEmail table, and filter based on some information. The simplest information to filter on is the email (as a string) and the account_id (as an integer). If you’re doing this in the application console, it can be done pretty simply this way:

account = Account.f('account key') # Note: make sure you put in the account key
email = "person@place.com" # Note: put the email you want in here

CapturedEmail.where(email: email, account_id: account.id) #Note: this returns an array

That will return an array of all the captured emails for that account that match the email address you’re looking for. What you do from here kind of depends a bit. If you’re just verifying this should be all you need. If you want to try syncing the email again, we can try that here.

our_captured_email = CapturedEmail.find(00000) # Note: use the id of the object in the array returned before you wanna work with
our_captured_email.sync

Assuming we succeeded at trying to sync this, you won’t really see much. If you see an error, that’s bad, and you’re officially off the beaten path with this one. If there were no errors, you can check in with the customer to see if it worked. You can also check Bugsnag to see if there was an error syncing the email that we received from Pardot when trying to sync it. This is uncommon, but possible.

Reference

There are a lot of reading materials that you can look through that will help beyond what this guide explicitly includes. Here’s a list of some related items that can help you on your journey:

  • Wistia Pardot help page: https://wistia.com/doc/pardot
  • Pardot Page for the Wistia integration: http://help.pardot.com/customer/portal/articles/2133386-wistia-connector-overview
  • Generic advanced turnstile integration troubleshooting: https://github.com/wistia/customer-happiness/blob/master/knowledge/integrations/advanced-turnstile-integration-troubleshooting.md
  • General Pardot integration info: https://github.com/wistia/customer-happiness/blob/master/knowledge/integrations/pardot.md