How do I associate a form with a Salesforce campaign?

Last updated: April 4, 2017

Available For:

Marketing: Pro, Enterprise
Sales: N/A

In order for a Salesforce campaign to be associated with a HubSpot form, the campaign must first be marked as active in Salesforce. Follow the steps below to select an active Salesforce campaign to associate with a HubSpot form. 

Please note: this feature is only applicable to Salesforce-integrated portals. 

When using a form to set a Salesforce campaign, the campaign status will be set to Responded by default and will not be editable. If you'd like to be able to edit a contact's campaign status after originally setting it, you must use a workflow rather than a form to associate your contacts with your Salesforce campaign.

Additionally, it is not possible to remove a contact's association with a Salesforce campaign if the campaign was originally set using a form.

For a form on a HubSpot Landing Page:

  • Navigate in HubSpot Marketing to Content > Landing Pages.
  • Find the landing page in question and click on the title, then click Edit.
  • Within the page editor, locate the form module and click on the module to edit.
  • Scroll within the Options tab of form module editor to the Salesforce campaign section.  
  • Select your active Salesforce campaign from the dropdown.
  • Click Done, then Update or Publish the page.


For a form on an external page:

  • Navigate in HubSpot Marketing to Contacts > Forms. 
  • Click on the name of the form and go to the Embed tab of the left sidebar.
  • Select your campaign from the Add users to a Salesforce campaign dropdown.

  • If this form is already embedded on an external page, you will need to re-embed the form on your page as the Salesforce campaign ID is added as a part of the code and this will not update dynamically.

Upon form submission, the SF Campaign ID will be included as a hidden form field.