Difference between revisions of "ATC/Current/SDK/Init"
From Genesys Documentation
(Published) |
(Published) |
||
Line 17: | Line 17: | ||
|alignment=Vertical | |alignment=Vertical | ||
|structuredtext=The <tt>init</tt> method initializes the Journey JavaScript SDK. | |structuredtext=The <tt>init</tt> method initializes the Journey JavaScript SDK. | ||
− | + | {{NoteFormat|For GDPR compliance, obtain a customer's consent before you call the <tt>init</tt> method. For more information about how to use {{MINTYDOCSPRODUCT}} in a GDPR-compliant manner, see {{#mintydocs_link:manual=AdminGuide|topic=GDPR|link text=GDPR}}. |1}} | |
− | |||
− | {{NoteFormat|For GDPR compliance, | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 36: | Line 34: | ||
|anchor=organizationID | |anchor=organizationID | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=*Description: | + | |structuredtext=*'''Description:''' Your organization's unique ID. {{Link-SomewhereInThisVersion|manual=SDK|topic=Init|anchor=FindOrgRegion|display text=Find your organization ID}} |
− | *Type: | + | *'''Type:''' String |
− | *Status: | + | *'''Status:''' Required |
<br /><br /> | <br /><br /> | ||
Line 48: | Line 46: | ||
|structuredtext={{NoteFormat|For detailed explanations of how you can use these options to configure tracking, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking}}.|2}} | |structuredtext={{NoteFormat|For detailed explanations of how you can use these options to configure tracking, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking}}.|2}} | ||
− | *Description: | + | *'''Description:''' Configures the Journey JavaScript SDK with its region and other known default options. |
− | *Type: | + | *'''Type:''' Object |
− | *Status: | + | *'''Status:''' Required |
− | *Properties: | + | *'''Properties:''' See the following table. |
{{{!}} class="wikitable" style="width: 1150px;" data-mce-style="width: 1150px;" | {{{!}} class="wikitable" style="width: 1150px;" data-mce-style="width: 1150px;" | ||
Line 68: | Line 66: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookieDomain | {{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookieDomain | ||
− | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a custom cookie domain | + | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a custom cookie domain. |
{{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}String | {{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}String | ||
{{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | {{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | ||
Line 74: | Line 72: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookieExpires | {{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookieExpires | ||
− | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a time in seconds for a | + | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a time in seconds for a visitor's cookie to expire. |
{{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Number | {{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Number | ||
{{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | {{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | ||
Line 80: | Line 78: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookiePrefix | {{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}cookiePrefix | ||
− | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a custom cookie prefix | + | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Sets a custom cookie prefix. |
{{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}String | {{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}String | ||
{{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | {{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | ||
Line 98: | Line 96: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}canonicalLink | {{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}canonicalLink | ||
− | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Uses canonical links | + | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Uses canonical links. |
{{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Boolean | {{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Boolean | ||
{{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | {{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | ||
Line 104: | Line 102: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}globalTraitsMapper | {{!}} style="width: 210.535px;" data-mce-style="width: 210.535px;"{{!}}globalTraitsMapper | ||
− | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Maps custom attributes to traits For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper|display text=Traits Mapper.}} | + | {{!}} style="width: 783.465px;" data-mce-style="width: 783.465px;"{{!}}Maps custom attributes to traits. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper|display text=Traits Mapper.}} |
{{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Array | {{!}} style="width: 42px;" data-mce-style="width: 42px;"{{!}}Array | ||
{{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | {{!}} style="width: 62px;" data-mce-style="width: 62px;"{{!}}Optional | ||
Line 122: | Line 120: | ||
|anchor=RegionNamesIDs | |anchor=RegionNamesIDs | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=The following table lists the available region names and corresponding | + | |structuredtext=The following table lists the available region names and corresponding IDs. |
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
{{!}}+ | {{!}}+ |
Revision as of 19:43, December 16, 2020
This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.
Contents
Learn how to use the init method to initialize the Journey JavaScript SDK.
About web messaging
Feature coming soon: Web messaging
This article only applies to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new web messaging feature to replace web chat. To use web messaging, you configure tracking through the Messenger JavaScript SDK instead of deploying a tracking snippet.
Description
The init method initializes the Journey JavaScript SDK.
Important
For GDPR compliance, obtain a customer's consent before you call the init method. For more information about how to use Genesys Predictive Engagement in a GDPR-compliant manner, see GDPR. Signature
ac('init', organisationId, options)
Arguments
organizationId
- Description: Your organization's unique ID. Find your organization ID
- Type: String
- Status: Required
options
Tip
For detailed explanations of how you can use these options to configure tracking, see Advanced tracking with cookies.- Description: Configures the Journey JavaScript SDK with its region and other known default options.
- Type: Object
- Status: Required
- Properties: See the following table.
Name | Description | Type | Status | Default |
region | Your organization's region. Find your region ID | String | Required | |
cookieDomain | Sets a custom cookie domain. | String | Optional | Highest level domain possible |
cookieExpires | Sets a time in seconds for a visitor's cookie to expire. | Number | Optional | 31536000 (1 year) |
cookiePrefix | Sets a custom cookie prefix. | String | Optional | |
autoLink | An array of domains whose outbound links will be modified to contain tracking information. For an example, see Configure advanced tracking. | Array of strings | Optional | |
allowedLinkers | An array of domains whose inbound referral will set tracking information. For an example, see Configure advanced tracking. | Array of strings | Optional | |
canonicalLink | Uses canonical links. | Boolean | Optional | False |
globalTraitsMapper | Maps custom attributes to traits. For more information, see Traits Mapper. | Array | Optional |
Find your org ID and region ID
Region names and IDs
The following table lists the available region names and corresponding IDs.
Region name | ID |
---|---|
Americas (US West) | usw2 |
Americas (US East) | use1 |
Americas (Canada) | cac1 |
EMEA (Dublin) | euw1 |
EMEA (London) | euw2 |
EMEA (Frankfurt) | euc1 |
Asia Pacific (Tokyo) | apne1 |
Asia Pacific (Seoul) | apne2 |
Asia Pacific (Sydney) | apse2 |
Comments or questions about this documentation? Contact us for support!