Difference between revisions of "ATC/Current/SDK/Record"
From Genesys Documentation
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
(Published) |
||
Line 6: | Line 6: | ||
|Dimension=DevTracking | |Dimension=DevTracking | ||
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform=GenesysEngage-cloud | + | |Platform=PureConnect, GenesysCloud, GenesysEngage-cloud |
|Section={{Section | |Section={{Section | ||
|sectionHeading=Description | |sectionHeading=Description | ||
Line 28: | Line 28: | ||
|anchor=eventName | |anchor=eventName | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=*Description: | + | |structuredtext=*'''Description:''' Name of the custom event |
− | *Type: | + | *'''Type:''' String |
− | *Status: | + | *'''Status:''' Required |
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 36: | Line 36: | ||
|anchor=customAttributes | |anchor=customAttributes | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=*Description: | + | |structuredtext=*'''Description:''' Adds extra information to <tt>pageview</tt> event |
− | *Type: | + | *'''Type:''' Object |
− | *Status: | + | *'''Status:''' Optional |
− | *Restrictions: | + | *'''Restrictions:''' Flat object with properties of type string, number, or Boolean |
− | ==== Example ==== | + | ====Example==== |
<code>ac('record', 'product_added', { price: 15.99, code: 'CDE-123', name: 'Product', hasBatteries: false });</code> | <code>ac('record', 'product_added', { price: 15.99, code: 'CDE-123', name: 'Product', hasBatteries: false });</code> | ||
|Status=No | |Status=No | ||
Line 47: | Line 47: | ||
|sectionHeading=options | |sectionHeading=options | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=*Description: Used for | + | |structuredtext=*'''Description:''' Used for more configuration |
− | *Type: | + | *'''Type:''' Object |
− | *Status: | + | *'''Status:''' Optional |
− | *Properties: | + | *'''Properties:''' See the following table. |
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
Line 61: | Line 61: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}traitsMapper | {{!}}{{!}}traitsMapper | ||
− | {{!}}{{!}} | + | {{!}}{{!}}Used to map custom attributes to traits. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper|display text=Traits Mapper.}} |
{{!}}{{!}}traitsMapper | {{!}}{{!}}traitsMapper | ||
{{!}}{{!}}<br /> | {{!}}{{!}}<br /> | ||
Line 67: | Line 67: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}callback | {{!}}{{!}}callback | ||
− | {{!}}{{!}} | + | {{!}}{{!}}Called once beacon is sent |
{{!}}{{!}}function | {{!}}{{!}}function | ||
{{!}}{{!}}optional | {{!}}{{!}}optional |
Revision as of 19:29, December 16, 2020
This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.
Learn how to use the record method to capture website events.
Description
The record method records custom website events.
Signature
ac('record', eventName, [customAttributes], [options])
Arguments
eventName
- Description: Name of the custom event
- Type: String
- Status: Required
customAttributes
- Description: Adds extra information to pageview event
- Type: Object
- Status: Optional
- Restrictions: Flat object with properties of type string, number, or Boolean
Example
ac('record', 'product_added', { price: 15.99, code: 'CDE-123', name: 'Product', hasBatteries: false });
options
- Description: Used for more configuration
- Type: Object
- Status: Optional
- Properties: See the following table.
Name | Description | Type | Status | Default |
traitsMapper | Used to map custom attributes to traits. For more information, see Traits Mapper. | traitsMapper | ||
callback | Called once beacon is sent | function | optional | |
callbackTimeout | ms to wait for beacon to send | number | optional |
Comments or questions about this documentation? Contact us for support!