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, so you have more accurate page tracking information for use in segments and outcomes.
+
|Context=Learn how to configure which click events {{MINTYDOCSPRODUCT}} tracks on your web sites. This configuration provides more accurate page tracking information for use in segments and outcomes.
 
|Dimension=Modules
 
|Dimension=Modules
 
|ComingSoon=No
 
|ComingSoon=No
|Prereq=
 
 
|Section={{Section
 
|Section={{Section
 
|sectionHeading=Description
 
|sectionHeading=Description
 
|anchor=Description
 
|anchor=Description
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
+
|structuredtext=The <code>autotrackClick</code> module tracks when and where a user clicks on a webpage. To use <code>autotrackClick</code>, configure the click events to track using the following options:
|image=
 
|structuredtext=The <code>autotrackClick</code> module tracks when and where a user clicks on a webpage. To use <code>autotrackClick</code>, use the following options to configure the click events that you want to track:
 
  
 
*{{Link-SomewhereInThisVersion|manual=SDK|topic=autotrackClick|anchor=Config|display text=Config}}
 
*{{Link-SomewhereInThisVersion|manual=SDK|topic=autotrackClick|anchor=Config|display text=Config}}
 
*{{Link-SomewhereInThisVersion|manual=SDK|topic=autotrackClick|anchor=Callback|display text=Callback}}
 
*{{Link-SomewhereInThisVersion|manual=SDK|topic=autotrackClick|anchor=Callback|display text=Callback}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 24: Line 19:
 
|anchor=Signature
 
|anchor=Signature
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=<syntaxhighlight lang="java">
 
|structuredtext=<syntaxhighlight lang="java">
  
 
ac('load', 'autotrackClick', config, [callback]);
 
ac('load', 'autotrackClick', config, [callback]);
 
</syntaxhighlight><br />
 
</syntaxhighlight><br />
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 37: Line 28:
 
|anchor=Example
 
|anchor=Example
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=<syntaxhighlight lang="java">
 
|structuredtext=<syntaxhighlight lang="java">
 
ac('load', 'autotrackClick', {
 
ac('load', 'autotrackClick', {
Line 49: Line 38:
 
});
 
});
 
</syntaxhighlight>
 
</syntaxhighlight>
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 56: Line 43:
 
|anchor=Config
 
|anchor=Config
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
+
|structuredtext='''Description:''' identifies an array of click events that should be tracked.  
|image=
 
|structuredtext=Description: identifies an array of click events that should be tracked.  
 
  
Type: object  
+
'''Type:''' object  
  
Properties:  
+
'''Properties:''' See the following table.
  
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
Line 90: Line 75:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 97: Line 80:
 
|anchor=Callback
 
|anchor=Callback
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
+
|structuredtext=When a module loads, callback is executed. No arguments pass to the callback.
|image=
 
|structuredtext=When a module fully loads, callback is executed. No arguments are passed to the callback.
 
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Revision as of 17:43, December 16, 2020

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 web sites. This configuration provides more accurate page tracking information for use in segments and outcomes.

Description

The autotrackClick module tracks when and where a user 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 that should be tracked.

Type: object

Properties: See the following table.

Name Description Type Status
selector A string that selects elements. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches String required
eventName is a string that will be 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-10-06 19:09:11)"
Comments or questions about this documentation? Contact us for support!