In order for this instruction to work, we need to save GA Client ID to all new Salesforce leads that Pardot creates.

  1. First, go to Pardot – Forms.
  2. Select a form you want to add to GA Connector.
  3. Click “Edit form”.
  4. Click “Fields” add a new field – GA_Client_ID field (it need to be synced with GA Client ID field from GA Connector package).
  5. Open “Look and Feel” and select “Below Form”.
  6. Click the “Code” symbol (Source Code)in the editor. This will allow to paste raw HTML code there.
  7. Paste this code in the editor:

This code allows Pardot iframes to receive GA CID cookie value from the parent window.

Keep in mind that this code assumes that your client ID field is called “GA Client ID”, and therefore has a CSS class “GA_Client_ID”. If it’s called differently in your case, you can replace “GA_Client_ID” in the code with the unique CSS class of that field.

Finally, paste this code on your website (on every page that contains Pardot forms):

If your Pardot forms isn’t hosted on go.pardot.com, you also need to add a class or an ID attribute “pardotform” to your Pardot iframe: