Difference between revisions of "ATC/Current/SDK/autotrackClick"

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 3: Line 3:
 
|DisplayName=autotrackClick
 
|DisplayName=autotrackClick
 
|TocName=autotrackClick
 
|TocName=autotrackClick
|Context=Learn how to configure which click events {{MINTYDOCSPRODUCT}} tracks on your websites. This configuration provides more accurate page tracking information for use in segments and outcomes.
+
|Context=Learn how to configure which click events {{MINTYDOCSPRODUCT}} tracks on your websites. This configuration provides more accurate page tracking information for use in segments and outcomes.{{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=Modules
 
|Dimension=Modules
 
|ComingSoon=No
 
|ComingSoon=No

Revision as of 18:29, April 28, 2021

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

Learn how to configure which click events Genesys Predictive Engagement tracks on your websites. This configuration provides more accurate page tracking information for use in segments and outcomes.

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 autotrackClick module tracks when and where a visitor clicks on a webpage. To use autotrackClick, configure the click events to track using the following options:

Signature

ac('load', 'autotrackClick', config, [callback]);

Example

ac('load', 'autotrackClick', {
  clickEvents: [
    { selector: 'button.bg-green', eventName: 'green_button_clicked' },
    { selector: 'footer *', eventName: 'footer_clicked' }
  ]
}, function () {
    console.log('"autotrackClick" has been loaded');
});

Config (required)

Description: Identifies an array of click events to track.

Type: Object

Properties: See the following table.

Name Description Type Status
selector String that selects elements. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches String required
eventName String used as the event name when an element matching the selector is clicked. String required

Example

{
  clickEvents: [
    { selector: 'button.bg-green', eventName: 'green_button_clicked' },
    { selector: 'footer *', eventName: 'footer_clicked' }
  ]
}

Callback (optional)

When a module loads, callback is executed. No arguments pass to the callback.

Retrieved from "https://all.docs.genesys.com/ATC/Current/SDK/autotrackClick (2024-07-28 01:20:10)"
Comments or questions about this documentation? Contact us for support!