Difference between revisions of "ATC/Current/SDK/Method reference"

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 20: Line 20:
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}{{#mintydocs_link:topic=Init|link text=init}}
 
{{!}}{{!}}{{#mintydocs_link:topic=Init|link text=init}}
{{!}}{{!}}Initializes the {{MINTYDOCSPRODUCT}} SDK
+
{{!}}{{!}}Initializes the Journey JavaScript SDK
 +
{{!}}-
 +
{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=initialized}}
 +
{{!}}Notifies when the Journey JavaScript SDK is fully initialized.
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}{{#mintydocs_link:topic=Destroy|link text=destroy}}
 
{{!}}{{!}}{{#mintydocs_link:topic=Destroy|link text=destroy}}
{{!}}{{!}}Stops all {{MINTYDOCSPRODUCT}} SDK activity and removes all tracking information
+
{{!}}{{!}}Stops all Journey JavaScript SDK activity and removes all tracking information
 
{{!}}}
 
{{!}}}
 +
|structuredtextwide=
 +
|FAQHeading=
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Session methods
 +
|anchor=SessionMethods
 +
|alignment=Vertical
 +
|Media=
 +
|image=
 +
|structuredtext=For complete information about a method, including signature and arguments, click the method's name.
 +
{{{!}} class="wikitable"
 +
{{!}}-
 +
{{!}}{{!}}'''Method'''
 +
{{!}}{{!}}'''Description'''
 +
{{!}}-
 +
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.session.getData}}
 +
{{!}}{{!}}Returns an object that contains session information
 +
{{!}}-
 +
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.session.getCustomerCookieId}}
 +
{{!}}{{!}}Returns a string that contains the customer cookie Id
 +
{{!}}-
 +
{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.session.getId}}
 +
{{!}}Returns a string containing session Id
 +
{{!}}}<br />
 
|structuredtextwide=
 
|structuredtextwide=
 
|FAQHeading=
 
|FAQHeading=
Line 56: Line 83:
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Session methods
+
|sectionHeading=Events methods
|anchor=SessionMethods
+
|anchor=EventsMethods
 
|alignment=Vertical
 
|alignment=Vertical
 
|Media=
 
|Media=
Line 67: Line 94:
 
{{!}}{{!}}'''Description'''
 
{{!}}{{!}}'''Description'''
 
{{!}}-
 
{{!}}-
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.session.getData}}
+
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=on}}
{{!}}{{!}}Returns an object that contains session information
+
{{!}}{{!}}Subscribes to notifications about a particular type of Journey JavaScript SDK activity.
 
{{!}}-
 
{{!}}-
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.sessiongetCustomerCookieId}}
+
{{!}}{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=once}}
{{!}}{{!}}Returns a string that contains the customer cookie Id
+
{{!}}{{!}}Subscribes to notifications for first event for a particular type of Journey JavaScript SDK activity.
 
{{!}}-
 
{{!}}-
{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=api.session.getId}}
+
{{!}}{{Link-SomewhereInThisVersion|manual=SDK|topic=off}}
{{!}}Returns a string containing session Id
+
{{!}}Unsubscribes from notifications about a particular type of Journey JavaScript SDK activity
{{!}}}<br />
+
{{!}}}
 
|structuredtextwide=
 
|structuredtextwide=
 
|FAQHeading=
 
|FAQHeading=
Line 104: Line 131:
 
|FAQHeading=
 
|FAQHeading=
 
|Status=No
 
|Status=No
}}{{Section
 
|sectionHeading=Visit API methods
 
|anchor=
 
|alignment=Vertical
 
|Media=
 
|image=
 
|structuredtext={{{!}} class="wikitable"
 
{{!}}-
 
{{!}}{{!}}'''Name'''
 
{{!}}{{!}}'''Description'''
 
{{!}}-
 
{{!}}{{!}}ac('api.visit.get', callback)<br />
 
{{!}}{{!}}Performs an AJAX request to retrieve the session data from the {{MINTYDOCSPRODUCT}} server. The object returned contains the most up-to-date data for the session. This is useful for monitoring live data, such as segment assigned IDs, outcome score progress, and last page viewed.<br />
 
{{!}}-
 
{{!}}{{!}}ac('api.visit.cached', callback)<br />
 
{{!}}{{!}}Retrieves the cached {{MINTYDOCSPRODUCT}} session data from the browser local storage. If session data does not exist in local storage, a session will be requested via an AJAX request from {{MINTYDOCSPRODUCT}}. This is practical for retrieving data that doesn't change for a session, such as the visit identifier, device details, location, referrer, and marketing campaign information.<br />
 
{{!}}-
 
{{!}}{{!}}ac('api.visit.getShortId', callback)<br />
 
{{!}}{{!}}This provides the same functionality as<tt>'api.visit.cached'</tt>, but only the 'shortId' is returned. The short ID is useful as a legible reference number that can be displayed on the website.<br />
 
{{!}}}
 
|structuredtextwide=
 
|FAQHeading=
 
|Status=Yes
 
}}{{Section
 
|sectionHeading=Customer API methods
 
|anchor=
 
|alignment=Vertical
 
|Media=
 
|image=
 
|structuredtext={{{!}} class="wikitable" style="font-size: 14px;"
 
{{!}}-
 
{{!}}{{!}}'''Name'''
 
{{!}}{{!}}'''Description'''
 
{{!}}-
 
{{!}}{{!}}ac('api.customer.get', callback)<br />
 
{{!}}{{!}}This performs an AJAX request to retrieve the visitor data from the {{MINTYDOCSPRODUCT}} server.<br />
 
{{!}}}
 
|structuredtextwide=
 
|FAQHeading=
 
|Status=Yes
 
 
}}
 
}}
 
}}
 
}}

Revision as of 10:08, June 10, 2020

This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.

View a list of all methods in the Journey JavaScript SDK.

Initialization methods

For complete information about a method, including signature and arguments, click the method's name.

Method Description
init Initializes the Journey JavaScript SDK
initialized Notifies when the Journey JavaScript SDK is fully initialized.
destroy Stops all Journey JavaScript SDK activity and removes all tracking information

Session methods

For complete information about a method, including signature and arguments, click the method's name.

Method Description
api.session.getData Returns an object that contains session information
api.session.getCustomerCookieId Returns a string that contains the customer cookie Id
api.session.getId Returns a string containing session Id

Tracking methods

For complete information about a method, including signature and arguments, click the method's name.

Method Description
pageview Tracks page views
record Records custom website events
identify Adds information to a customer
forms:track  

Events methods

For complete information about a method, including signature and arguments, click the method's name.

Method Description
on Subscribes to notifications about a particular type of Journey JavaScript SDK activity.
once Subscribes to notifications for first event for a particular type of Journey JavaScript SDK activity.
off Unsubscribes from notifications about a particular type of Journey JavaScript SDK activity

Utility methods

For complete information about a method, click the method's name.

Method Description

serialize

Used for passing serialized data from a form.
dom - ready
Allows you specify a function handler to run when the DOM has fully loaded.
debug
Sends helpful messages to the console.
Retrieved from "https://all.docs.genesys.com/ATC/Current/SDK/Method_reference (2025-06-23 21:28:20)"
Comments or questions about this documentation? Contact us for support!