- 29 Dec 2023
- 1 Minute to read
All Page Functions
- Updated on 29 Dec 2023
- 1 Minute to read
You can call these predefined functions where applicable when creating a custom campaign, rule or goal.
Getting the total amount of the cart/basket
The following function returns the total amount of the cart/basket.
Function Call | Returns |
---|---|
Insider.systemRules.call('getTotalCartAmount') | Float |
Insider.systemRules.call('getTotalCartAmount')
For example, the below response returns the total amount of the cart/basket.
Getting the language
The following function returns the current language of your website.
Function Call | Returns |
---|---|
Insider.systemRules.call('getLang') | String |
Insider.systemRules.call('getLang')
For example, the below response returns the language of your website.
Detecting the homepage
The following function detects if the current page is the homepage.
Function Call | Returns |
---|---|
Insider.systemRules.call('isOnMainPage') | Boolean |
For example, the below response returns if the current page is the homepage.
Getting the searched keywords
The following function returns the searched keywords.
Function Call | Returns |
---|---|
Insider.systemRules.call('getSearchKeyWords') | String |
Insider.systemRules.call('getSearchKeyWords')
For example, the below response returns the searched keywords on your website.
Getting the cart/basket count
The following function returns the number of the products in the cart/basket.
Function Call | Returns |
---|---|
Insider.systemRules.call('getCartCount') | Number |
Insider.systemRules.call('getCartCount')
For example, the below response returns the number of the products in the cart/basket.
Getting the currency
The following function returns the currency of the price(s) on any page of your website.
Function Call | Returns |
---|---|
Insider.systemRules.call('getCurrency') | String |
Insider.systemRules.call('getCurrency')
For example, the below response returns the currency of the price(s) of your website.
Getting the login information of the user
The following function returns the information whether the current user logged in.
Function Call | Returns |
---|---|
Insider.systemRules.call('isUserLoggedIn') | Boolean |
Insider.systemRules.call('isUserLoggedIn')
For example, the below response returns false since the current user did not log in to your website. Otherwise, it returns true.
Getting the registration information of the user
The following function returns the information whether the current user registered successfully.
Function Call | Returns |
---|---|
Insider.systemRules.call('isOnRegSuccessPage') | Boolean |
Insider.systemRules.call('isOnRegSuccessPage')
For example, the below response returns false since the current user did not register to your website successfully. Otherwise, it returns true.
Detecting the coupon page
The following function detects whether the current page is the coupon page.
Function Call | Returns |
---|---|
Insider.systemRules.call('isOnCouponPage') | Boolean |
Insider.systemRules.call('isOnCouponPage')
For example, the below response returns false since the current page is not the coupon page. Otherwise, it returns true.
Getting the coupon button usage
This function returns the coupon inputs.
Function Call | Returns |
---|---|
Insider.systemRules.call('useCouponButton') | Object |
Insider.systemRules.call('useCouponButton')
For example, the below response returns the coupon button usage details.
Getting the coupon application information
The following function returns the information whether the coupon is applied.
Function Call | Returns |
---|---|
Insider.systemRules.call('isCouponCodeApplied') | Boolean |
Insider.systemRules.call('isCouponCodeApplied')
For example, the below response returns true since the coupon code is applied. Otherwise, it returns false.