Condition Type & Operator Reference

Condition Types

First Visit

Is this the first time the user has visited the site.

Direct Visit

Has the user visited the site directly or where they referred from another site.

Lead Score

The user’s lead score as a numeric value.

  • Lead score values will be an integer, such as: 1, 2, 5, 10, 0, -3, -20
  • Please Note: Storing lead scores across multiple visits requires a Logic Hop Real-Time Data plan
Location

Is the visitor located in a specific country, region, city, etc.

Mobile Device

Is the visitor on a mobile device. (Smartphone or tablet)

Tablet

Is the visitor on a tablet.

Time Elapsed

The amount of time that has elapsed since the:

  • Last page was visited – Current Session
  • This visit started – Current Session
  • Last visit to the site – Previous Session
  • First visit to the site – First Session
Goal – All Visits

Has a specific Goal been completed or not completed by the visitor.

Goal – Current Session

Has a specific Goal been completed or not completed by the visitor during the current session.

Goal Views – All Visits

The number of times the current visitor has completed a specific Goal.

Goal Views – Current Session

The number of times the visitor has completed a specific Goal during the current session.

Current Page Views – All Visits

The number of times the current page has been viewed by the current visitor.

Current Page Views – Current Session

The number of times the current page has been viewed by the visitor during the current session.

Total Page Views – All Visits

The number of all page views combined for the current visitor.

Total Page Views – Current Session

The number of all page views combined during the current session.

Specific Page Views – All Visits

The number of times the current user has viewed a specific page.

Specific Page Views – Current Session

The number of times the user has viewed a specific page during the current session.

Referrer

The current referring URL of the current visitor.

  • Full path including query string.
  • Internal and external referrers.
Query String

Is the query string variable set to a specific value.

  • Value of a query string variable.
  • Case-Sensitive.
  • Example: http://logichop.com/?animal=kangaroo
    • Variable is “animal”
    • Value is “kangaroo”
  • Note: Query Strings that contain spaces & special characters are often URL encoded. When specifying the value of a variable, do so without the URL encoding.
    • URL encoded query string value is “email%20newsletter”
    • Condition value should be “email newsletter”
Query String Session

Has the query string variable been set to a specific value at any time during the current user session.

  • See Query String condition for details.
  • Data remains until user quits browser.
  • Most recent value stored for duplicate variables
User Is

Is the visitor currently logged in to WordPress or logged out.

Day of the Week

The current day of the week.

  • Starting with Monday, ending with Sunday.
  • Example:
    • Tuesday is less than Friday.
    • Saturday is greater than Wednesday.
  • Based on WordPress date & time.
Day

The current numerical day of the month.

  • Based on WordPress date & time.
Month

The current month of the year.

  • Starting with January, ending with December.
  • Example:
    • March is less than July.
    • October is greater than April.
  • Based on WordPress date & time.
Year

The current year.

  • Based on WordPress date & time.
Hour

The current hour of the day.

  • Example:
    • 2am is less than 1pm.
    • 11pm is greater than 12am.
  • Based on WordPress date & time.
Minutes

The current minute of the hour.

  • Most useful with Greater Than or Less Than operators.
  • Based on WordPress date & time.
Date

The current date.

  • Format: mm/dd/yyyy.
  • Halloween 2020 is 10/31/2020.
  • Based on WordPress date & time.
User Path

The current visitor’s path through the site.

  • Up to 5 pages.
  • Leave pages unselected for fewer than 5.
  • User’s path always consists of the 5 most recent pages.

Comparison Operators

Numeric, Text & Date Operators

  • Equal To
  • Greater Than
  • Less Than or Equal To
  • Greater Than or Equal To
  • Less Than
  • Not Equal To

Goal Operators

  • Completed
  • Not Completed

Page & Path Operators

  • Is
  • Is Not
  • Is In List
  • Is – Case-insensitive
  • Is Not – Case-insensitive
  • Is In List – Case-insensitive

User Operators

  • Logged In
  • Logged Out

Variables

Logic Hop exposes a number of variables stored in a PHP session for the active user. This data can be displayed for personalization using Logic Hop Data Shortcodes or via PHP for use in themes and plugins.

To retrieve a stored value via PHP, pass the variable name as a string into the $logichop->get_data() function. Nested object variables should be referenced using dot notation, such as:

Location.City

Nested array values can be accessed using a semi-colon, such as:

Path:0

Echo Logic Hop data via PHP:

global $logichop;
$logichop->get_data('Location.City');

Return Logic Hop data via PHP:

global $logichop;
$logichop->get_data('Location.City', false);

Available variables can be viewed with the Logic Hop setting “Session Output” set to “Enable Session Display”. Once enabled, append the query string ?session=display to any page to output the variables. “Session Output” should only be used during testing and development – Make sure to disable this option for production websites.

Variable Reference

  • UID
  • FirstVisit
  • Timestamp
    • FirstVisit
    • LastVisit
    • ThisVisit
    • LastPage
  • Mobile
  • Tablet
  • IP
  • IsBot
  • UserAgent
  • Location
    • Active
    • IP
    • CountryCode
    • CountryName
    • RegionCode
    • RegionName
    • City
    • ZIPCode
    • TimeZone
    • Latitude
    • Longitude
    • MetroCode
  • LandingPage
  • LeadScore
  • Source
  • LoggedIn
  • Page
  • Views
  • Pages
  • Goals
  • PagesSession
  • GoalsSession
  • ViewsSession
  • Path
    • 0
    • 1
    • 2
    • 3
    • 4
  • QueryStore
  • Query
  • Referrer
  • Date
    • Timestamp
    • DateTime
    • Date
    • Year
    • LeapYear
    • Month
    • MonthName
    • Day
    • DayName
    • DayNumber
    • DayYear
    • Week
    • Hour
    • Hour24
    • Minutes
    • Seconds
    • AM
    • PM
  • Token