Quick Reference

Overview

Logic Hop integrates with HubSpot to provide personalization using HubSpot data. You can easily create conditions and display HubSpot data to create an engaging, personalized experience.

Note: HubSpot functionality requires the Logic Hop HubSpot Add-on.

Installation

  • Install and activate Logic Hop
  • Install and activate the HubSpot WordPress plugin
  • Install and activate Logic Hop HubSpot Add-on
  • Navigate to the Logic Hop Settings page
  • Add your HubSpot API Key
  • Click Save Changes

Logic Hop Settings

HubSpot API Key

To access your HubSpot API Key:

  • Login to your HubSpot account
  • Navigate to Settings > Integrations > API Key
  • Click Show Key

HubSpot API Key

HubSpot Data

Logic Hop automatically loads data from the HubSpot API when the user first visits your site. Users are identified based on their HubSpot User Token which is stored in the hubspotutk cookie.

Logic Hop loads HubSpot data from the HubSpot API. Logic Hop never stores or modifies HubSpot data.

To force Logic Hop to reload HubSpot data append the following query string to any page:

?hubspot=true


Force reloading HubSpot data is useful after the user completes a HubSpot form on your site.

Note: It can take 10-30 seconds for HubSpot data to be available after a form has been submitted.

HubSpot Forms

Logic Hop stores HubSpot form submissions in the HubSpotForms variable as an array of form names. To reference the form in a Logic Hop condition you must use the full form name.

HubSpot Form Names

Form Completed Condition

To create a condition that checks if a user has completed a specific HubSpot Form:

  • Create a new condition
  • Choose HubSpot: Form Completed as the condition type
  • Enter the Form Name as it is listed on HubSpot
  • Choose Completed or Not Completed

HubSpot Form Completed Condition

Field Data

Logic Hop uses HubSpot the Field Label to lookup and access field data submitted through HubSpot Forms. Spaces in Field Labels are automatically replaced with underscore characters. Fields Labels are converted lowercase.

  • A Field with a Field Label set to First Name would be accessed by:
    • __first_name__
  • A Field with a Field Label set to Preferred Design Style would be accessed by:
    • preferred_design_style

Note: If two or more forms have a field with identical Field Label names the data from the most recently submitted form will be used for that value.

HubSpot Field Labels

Displaying HubSpot Data

Logic Hop provides a variety of integration points for HubSpot including displaying form data within WordPress content using Logic Tags, Javascript or PHP.

Display HubSpot with Logic Tags

Logic Tags can be added from the Logic Hop tool in the WordPress Page/Post editor. Click the Data tab, select a value and click Insert Variable.

Like all Logic Tags for data, the HubSpot Logic Tag is a single block of code which appears as:

{{ var: HubSpot.##Field Label## }}

Replace ##Field Label## with the corresponding HubSpot Field Label. Spaces in label names are automatically replaced with an underscore and converted to lowercase.

A field with the label Preferred Design Style would be accessed using:

{{ var: HubSpot.preferred_design_style }}


HubSpot Logic Tags

If the data is available for the user, it will be displayed on the page. Logic Tags can be nested within HTML tags and also within Logic Tag conditions.

HubSpot Logic Tags can also be created using the Logic Hop Tool Palette.

Logic Tool Palette

Using HubSpot Data with Conditions

HubSpot data can be used as parameters in Logic Hop Conditions.

Learn more about Logic Hop Conditions.

HubSpot Condition Types

The Logic Hop Condition Builder will display all HubSpot condition types available for use. Each can be used alone or combined with other condition types to create complex logic.

  • HubSpot: Form Completed
    • Has a specific HubSpot form been completed
  • HubSpot: Data Value
    • Does data from a HubSpot field meet the specified criteria
  • HubSpot: Data Value Contains
    • Does data from a HubSpot field contain a specific value

HubSpot Condition

HubSpot Variables

HubSpot data is stored in the HubSpot variable within the Logic Hop Session object.

If a company has been assigned to a user by HubSpot the company data will be available within the company object which is a child of the HubSpot variable.

Variables

  • HubSpotUTK (string)
  • HubSpotForms (array)
    • Form Name (string)
  • HubSpot (object)
    • Field Name (string)
    • company (object)
      • Field Name (string)

When planning your conditional logic and which data to display it is useful to enable session output to view the stored data. Doing so with a user that has existing HubSpot data will list the fields that can be accessed by Logic Hop.

Learn more about session output.

Note: For sites with a large amount of HubSpot data consider using the free plugin WP Session Manager.