GET_TYPE_TRANSFORMS

ResultProxy wrappers

GET_TYPE_TRANSFORMS
Static Members
toArray(proxy)
toObject(proxy)
toStr(proxy)
toFunction(proxy)
toBoolean(proxy)
toNumber(proxy)

ARRAY_TRANSFORMS

ArrayPolyfill wrappers

ARRAY_TRANSFORMS
Static Members
map
filter
find

QUERY_SERVICE_TRANSFORMS

ElementWrapper method wrappers

QUERY_SERVICE_TRANSFORMS
Static Members
toText(elementWrapper)
toElement(elementWrapper)

getFirstEmailMatch

[WINDOW, DOM, DATA_LAYER, COOKIE] Finds the first email match in a given string Will match {any non-whitespace}@{any non-whitespace} Does not check for domain

getFirstEmailMatch(result: string): string
Parameters
result (string)
Returns
string:

getFirstPhoneMatch

[WINDOW, DOM, DATA_LAYER, COOKIE] Finds the first 10 digit number in a given string after removing all non-numbers and leaving whitespace

getFirstPhoneMatch(result: string): string
Parameters
result (string) string
Returns
string:

getFirstPaymentType

[WINDOW, DOM, DATA_LAYER, COOKIE] Returns payment types of PAYPAL, AMAZON and defaults to CREDIT_CARD if 'paypal' and 'amazon' are not found in the input

getFirstPaymentType(result: string): (any | string)
Parameters
result (string) has to be a string, most likely innerHTML/textContent
Returns
(any | string):

match

[WINDOW, DOM, DATA_LAYER, COOKIE] Returns the first matching result for a given regex by default

match(result: string, regex: RegExp, groupToCapture: any): string
Parameters
result (string) string containing event field value
regex (RegExp)
groupToCapture (any) defaults to 0 (entire matched string)
Returns
string: