JavaScript Query String Getting and Parsing to Object with Regular Expression

What is Query String Query string is the part of a uniform resource locator (URL) containing data that does not fit conveniently into a hierarchical path structure. It commonly includes fields (requested pairs of key and value) added to a base URI by a Web browser or other client application, for example

The first […]

Continue reading


jQuery Access Internal Event-related Data through _data() method

jQuery internally stores and maintains the list of events which was attached or detached from DOM elements. Meanwhile, jQuery data mechanism jQuery._data() – the “undocumented” method – which allow us to access the jQuery internal event-related data structure. As of jQuery 1.8, the event data is no longer available from the “public API” for data. […]

Continue reading


JavaScript Generate UUID/GUID for RFC 4122 Version 4 Compliant with Regular Expression

What is UUID/GUID A Universally Unique IDentifier (UUID) – also called a Global Unique IDentifier (GUID) – is a 128-bit value formatted into blocks of hexadecimal digits separated by a hyphen (‘-‘ U+002D). A typical UUID is baef6775-eb3a-4ac9-85d3-70e4aa0d9d94. A version 4 UUID is defined in RFC 4122: 128 randomly-generated bits with six bits at certain […]

Continue reading


JavaScript Implementation Guide of Adobe SiteCatalyst Omniture

This section describes the process of implementing Adobe SiteCatalyst Omniture Tracking. Before Implementation Before you implement the Visitor ID service, your company must be provisioned for the Marketing Cloud. You’ll receive a Marketing Cloud Organization ID that must be provided during Visitor ID service initialisation. See Getting Started with Adobe Marketing Cloud. Also, to successfully […]

Continue reading


Sample Page Code for Adobe SiteCatalyst AppMeasurement.js

This section to show the sample page code for the Adobe SiteCatalyst AppMeasurement.js. The sample page (custom tracking) code below should be placed after the opening body tag on each page you want to track. Also, make sure that you have also included a reference to AppMeasurement.js and VisitorAPI.js on each page.

Continue reading


Sample Global Configuration Code for Adobe SiteCatalyst AppMeasurement.js

This section to show the sample code for the Adobe SiteCatalyst AppMeasurement.js global configuration which should be placed at the beginning of your AppMeasurement.js file. Important: This example uses the visitor ID service, which is deployed as part of your JavaScript Implementation. Enabling the visitor ID service in AppMeasurement before you have included the Visitor […]

Continue reading


JavaScript: Void Operator Explanation

The void is a operator that always returns undefined after evaluate a given expression The void operator allows inserting expressions that produce side effects into places where an expression that evaluates to undefined is desired. Syntax:

It is often used merely to obtain the undefined primitive value, usually using void(0) (which is equivalent to […]

Continue reading


JavaScript: Date Object Functionality

The built-in object for date and time in JavaScript is Date. It handles all functionality: creation, modification and, partially, date formatting. Constructors Getter methods Setter methods Auto-adjusting Numeric conversion, date diff Formatting Parsing from string, Date.parse 1. Constructors The syntaxes to create a Date are: 1. new Date(): Creates a Date object with current date […]

Continue reading


JavaScript: Getting the Number of Keys/Properties of an Object

The standard Object implementation (ES5.1 Object Internal Properties and Methods) does not require an Object to track its number of keys/properties, so there should be no standard way to determine the size of an Object without explicitly or implicitly iterating over its keys. Here are the most commonly used alternatives: 1. ECMAScript’s Object.keys() Object.keys(obj).length; Works […]

Continue reading