Difference between revisions of "ATC/Current/SDK/Record"
From Genesys Documentation
(Published) |
(Published) |
||
Line 3: | Line 3: | ||
|DisplayName=record | |DisplayName=record | ||
|TocName=record | |TocName=record | ||
− | |Context=Learn how to use the <tt>record</tt> method to capture website events. | + | |Context=Learn how to use the <tt>record</tt> method to capture website events.{{BarbFeatureTemp|Feature=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 {{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature to replace web chat. |
|Dimension=DevTracking | |Dimension=DevTracking | ||
|ComingSoon=No | |ComingSoon=No |
Revision as of 18:30, April 28, 2021
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.
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.
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!