Liquid globals

Description

The Liquid globals object is available on every page and it contains useful information about the site, the current page, the logged in user, browser related information and much more.

Here is what the globals object contains

Liquid tag Description
{{globals.get}} The current relative path and the query parameters passed in the URL. For example, for the URL http://mtica1.businesscatalyst.com/_s1/s2?a=1&b=2 the output of the module is:
{
  "ID": "/_s1/s2",
  "a": "1",
  "b": "2"
}
{{globals.site}} Site related information:
 "site": {
    "id": 12345,
    "name": "mtica1",
    "host": "mtica1.businesscatalyst.com",
    "countryCode": "RO",
    "language": "GB",
    "dateNow": "2015-01-09T15:11:33.0878202"
  }
{{globals.user}} User related information (assuming somebody is logged in):

  {
  "entityId": 9532870,
  "firstname": "John",
  "middleName": "Doe",
  "lastname": "John",
  "fullname": "John John Doe",
  "username": "jdoe",
  "email": "jdoe@mailinator.com",
  "email2": "jdoe2@mailinator.com",
  "email3": "jdoe3@mailinator.com",
  "customerType": {
    "id": 420538,
    "name": "Other"
  },
  "leadSourceType": {
    "id": 465473,
    "name": "Other"
  },
  "industryType": {
    "id": 1090438,
    "name": "Other"
  },
  "ratingType": {
    "id": 126400,
    "name": "Warm"
  },
  "isWholesaler": true,
  "isLoggedIn": true
}
  
{{globals.visitor}} Visitor related information:
"visitor": {
    "deviceClass": "desktop",
    "ip": "123.123.123.123",
    "country": "RO",
    "city": "BUCHAREST",
    "userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36"
  }
{{globals.cart}} The shopping cart URL
"cart": {
    "cartUrl": "/OrderRetrievev2.aspx?CatalogueID=0"
  }
{{globals.cookie}} The cookies stored on the current domain (including cookies you might create using javascript). For a site visitor that is not logged in the Admin Console the cookie object looks something like this:
"cookie": {
    "visitorDeviceClass": "desktop",
    "ASP.NET_SessionId": "x54fgiweu1zwhoisjetfsv5r",
    "ANONID_FS1576341": "24.09.2014 12:21:51.298",
    "ANONID1576341": "e626ac8b-45ff-4801-9808-ec9ad51d847a",
    "VISID1576341": "877790b5-3feb-499d-8227-a12cb6a5f388#mtica4.businesscatalyst.com#24.09.2014 12:21:51.298"
  }