How to Create Logic Hop Goals

Understanding Logic Hop Goals

Goals are how Logic Hop stores user actions. You create a Goal for any event or action you would like to store and track. When a Goal is “triggered” by a user, that Goal is associated with the user for their current and future visits to your site.

Some possible uses for Goals include:

  • Has the user signed up for your newsletter
  • Did the user visit your site by clicking a specific link
  • Has the user purchased your product
  • Did the user abandon a shopping cart
  • How many videos has the user viewed
  • Which options on a survey did the user select

Goals can be triggered on page load, when a Logic Hop Condition is met or by a combination of events, including Javascript events. This allows for Goals to be easily integrated with third-party plugins.

Logic Hop can use Goals within Logic Hop Conditions to dynamically display content to a specific user or redirect them to a different page. Any one, or a combination of, multiple Goals can be used to show content and offers to your users or redirect them to specific pages on your site.

Data Lifespan: Goals are stored by Logic Hop and associated with a user by a single cookie. Logic Hop Goals can be stored for up to a year per user. As with all cookies, Logic Hop data is specific to the user and their browser. If a user clears their cookies, the data will be disassociated with that browser.

Anatomy of a Goal

  • Goal Title
    • Title
    • Used to generate Goal Slug – Example: newsletter-signup
  • Goal Description
    • Description
    • Describes Goal functionality
  • Logic Hop Lead Score
    • Value to increment Lead Score by when goal is completed
    • Learn more about Lead Scores
  • Increment Options
    • Increment on every complete
    • Increment on first complete only
    • Increment on first complete each session
  • Logic Tag
    • Logic Tag to copy & paste into WordPress content

Creating a Goal

Creating and managing Goals with Logic Hop is similar to creating a new Post with WordPress.

Adding a Goal

Step 1

Click Goals under the Logic Hop menu in your WordPress Dashboard.

Step 2

Click “Add New” to create a new Goal or click the title of an existing Goal to edit.

Step 3

Enter a title and description for the Goal.

Titles and descriptions are for your use within the WordPress Dashboard. It is best to use short, descriptive titles such as “Newsletter Signup” or “Purchased Subscription”.

Step 4

Click Publish.

Congratulations! Your Goal is now ready for use.

Click here to learn how to trigger Goals on Pages & Posts.

Click here to learn how to trigger Goals using Shortcodes.

Click here to learn how to trigger Goals using Javascript.

Creating and managing Goals with Logic Hop is similar to creating a new Post with WordPress.

Please Note: Similar to WordPress Post and Page titles, the Goal title becomes the “slug” for your Goal. If you are using Javascript Tracking, this “slug” may be visible in the source code of your page. For example, a Goal titled “Newsletter Signup” may appear as the following Javascript function: logichop_goal(‘newsletter-signup’);

Deleting a Goal

Step 1

Click Goals under the Logic Hop menu in your WordPress Dashboard.

Step 2

Click “Trash” under the title of the Goal you’d like to delete.

Please Note: It is best practice to delete or disable any Conditions or page-level logic that rely on Goals that have been removed.

Set Goals with PHP

Logic Hop Goals can be set directly via PHP for use in themes and plugins. Pass a Goal ID into the $logichop->set_goal() function. When the Goal is set, true is returned. If there was a problem setting the goal, false is returned.

global $logichop;
$result = $logichop->set_goal(42);

The above example returns true if Goal ID 42 is set or false if there was a problem setting the goal.