Dynamic Script
You can write a script (a new language that Apxor has created which somewhat looks like Javascript) instead of plain text to substitute user and session properties that you have already logged to Apxor SDK or you can substitute a text element from your application, or hidden text that you set it as a keyed tag (apx_view_tag).
The Apxor Language
The Apxor language looks similar to Javascript with some modifications.
We assume every dynamic param that you want to substitute in a text is a pre-defined variable that you can create upfront in the Script dialogue that Apxor Dashboard provides to you.
We support the following operators and keywords as part of our language specification
Unary Operators
!
(Negation)
Logical Operators
&&
(Logical AND)
||
(Logical OR)
Mathematical Operators
+
(Arithmetic Addition)
-
(Arithmetic Subtraction)
*
(Arithmetic Multiplication)
/
(Arithmetic Division)
%
(Arithmetic Modulo)
Comparison Operators
<
(Less than)
<=
(Less than or Equals)
>
(Greater than)
>=
(Greater than or Equals)
==
(Equality)
!=
(Not Equality)
contains
(Checks if a string contains another string)
Keywords
httpGet
,onSuccess
,onError
will be used to make a HTTP GET API call
format
will be used to format a string
if
,else
will be used to write conditional evaluation
true
,false
boolean keywords
toInt
will be helful to convert double/float values to integer
Examples
Note:
Assume the following variables are defined
UserName (User Property)
RewardPoints (User Property)
IsSubscribed (User Property)
Subscribed (API JSON response parameter
user.is_subscribed
)
Simple formatting of the string
Conditional Dynamic Text
API call
Last updated