Page tree
Skip to end of metadata
Go to start of metadata

A comprehensive list of all Interaction Studio (formerly Evergage)-created JavaScript functions.



Interaction Studio Classic Only

Please note, the contents of this article are intended for customers using Interaction Studio (formerly Evergage Classic). Do not adjust your beacon version to downgrade or upgrade.

This Article Explains

This article provides a list of all Interaction Studio-created JavaScript functions.

Sections in this Article

About Interaction Studio JavaScript Functions

The Interaction Studio-created JavaScript functions fall under one of two categories:

  1. Interaction Studio Catalog functions, which are used in the Site-Wide JavaScript that integrates your site with the Interaction Studio catalog
  2. Interaction Studio's "safe" functions, which are safer functions to be used in place of their corresponding JavaScript and JQuery functions when working in your Site-Wide JavaScript.

The purpose of Promote functions is to make complex processes like "add to cart" into easy-to-use and easy-to-read functions like "addToCart".

The purpose of "safe" functions is to ensure that no matter what is put into your Site-Wide JavaScript (like bad syntax or bad logic), an error in one part of the code will still leave the rest intact.

Interaction Studio JavaScript Functions

The syntax for implementing these functions is Evergage.functionName(parameters). The specific functions are:

setCurrentPageLocale: function setCurrentPageLocale(pageLocale) {},

viewItem: function viewItem(item, opts) {},

viewItemDetail: function viewItemDetail(item, opts) {},

viewCategory: function viewCategory(category, opts) {},

viewTag: function viewTag(tag, opts) {},

addToCart: function addToCart(addedLineItem, order, opts) {},

purchase: function purchase(order, opts) {},

review: function review(item, opts) {},

share: function share(item, opts) {},

comment: function comment(item, opts) {},

favorite: function favorite(item, opts) {},

ItemType: ItemType = {
                Category: 'c',
                Product: 'p',
                Article: 'a',
                Blog: 'b',
                Tag: 't'
            },

hideSections: function hideSections() {},


Interaction Studio "Safe" Functions

(Make sure you check the examples further below)

The syntax for implementing these functions is Evergage.safeFunction("css/JQuery selector", normal JavaScript parameters). The specific functions are:

safeBlur(selector, {optional arguments}, function() {});
safeChange(selector, {optional arguments}, function() {});
safeClick(selector, {optional arguments}, function() {});
safeDblclick(selector, {optional arguments}, function() {});
safeFocus(selector, {optional arguments}, function() {});
safeFocusin(selector, {optional arguments}, function() {});
safeFocusout(selector, {optional arguments}, function() {});
safeHover(selector, {optional arguments}, function() {});
safeKeydown(selector, {optional arguments}, function() {});
safeKeypress(selector, {optional arguments}, function() {});
safeKeyup(selector, {optional arguments}, function() {});
safeLoad(selector, {optional arguments}, function() {});
safeMousedown(selector, {optional arguments}, function() {});
safeMouseenter(selector, {optional arguments}, function() {});
safeMouseleave(selector, {optional arguments}, function() {});
safeMousemove(selector, {optional arguments}, function() {});
safeMouseout(selector, {optional arguments}, function() {});
safeMouseover(selector, {optional arguments}, function() {});
safeReady(selector, {optional arguments}, function() {});
safeResize(selector, {optional arguments}, function() {});
safeScroll(selector, {optional arguments}, function() {});
safeSelect(selector, {optional arguments}, function() {});
safeSubmit(selector, {optional arguments}, function() {});
safeTouchstart(selector, {optional arguments}, function() {});
safeTouchmove(selector, {optional arguments}, function() {});
safeTouchend(selector, {optional arguments}, function() {});
safeTouchCancel(selector, {optional arguments}, function() {});
safeTimeout(function() {}, time);
safeInterval(function() {}, time);

Examples:

If using more parameters than just the selector and the function(event) { //callback }, then put them in place of { } below:

        Evergage.safeClick("#selector", { }, function(event) {
            console.log("clicked");
        });

Otherwise, the { } can be omitted:

        Evergage.safeClick("#selector", function(event) {
            console.log("clicked");
        });

  • No labels