Difference between revisions of "ATC/Current/SDK/Forms: track"

From Genesys Documentation
Jump to: navigation, search
(Published)
 
(15 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
|Standalone=No
 
|Standalone=No
 
|DisplayName=forms:track
 
|DisplayName=forms:track
|Platform=PureEngage, PureConnect, PureCloud
 
 
|TocName=forms:track
 
|TocName=forms:track
 +
|Context=Learn how to use the<tt>forms:track</tt> method to capture when visitors complete web-based forms.
 +
|Dimension=DevTracking
 
|ComingSoon=No
 
|ComingSoon=No
|Context=Learn how to use the<tt>forms:track</tt> method to capture when users complete web-based forms.
+
|Platform=PureConnect, GenesysCloud, GenesysEngage-cloud
 
|Section={{Section
 
|Section={{Section
 +
|alignment=Vertical
 +
|structuredtext={{NoteFormat|1=This article only applies to customers using {{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_web_chats|display text=web chat}}. If you are a Genesys Cloud CX 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.|2=}}<br />
 +
|Status=No
 +
}}{{Section
 
|sectionHeading=Description
 
|sectionHeading=Description
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
|gif=No
+
|structuredtext=The <tt>forms:track</tt> method tracks form submission and abandonment events. By default, forms tracking captures form data when a visitor submits or abandons a form.  
|structuredtext=The <tt>forms:track</tt> method tracks form submission and abandonment events. By default, forms tracking captures form data upon submit or abandon.
 
 
 
*Recorded form data '''includes''' the values of all input, select, and textarea fields.
 
*Recorded form data '''excludes''' the values of hidden, submit, and password fields, along with any fields that contain any of the following sensitive input strings:
 
  
{{{!}} class="wikitable"
+
*Recorded form data '''includes''' the values of all input, select, and text area fields.
!Credit and debit card information
+
*Recorded form data '''excludes''' the values of hidden, submit, and password fields, along with any fields that contain any of the {{Link-SomewhereInThisVersion|manual=SDK|topic=Form_tracking_API|anchor=SensitiveFields|display text=sensitive input strings}}.
!Personal information
+
{{NoteFormat|For {{MintyDocsProduct}} SDK forms tracking to capture form data, each input requires a properly defined <tt>name</tt> attribute.|}}
{{!}}-
 
{{!}}
 
*^cc
 
*cardnum
 
*ccnum
 
*creditcard
 
*csc
 
*cvc
 
*cvv
 
*exp
 
{{!}}
 
*pass
 
*billing
 
*seccode
 
*securitycode
 
*securitynum
 
*socsec
 
*socialsec
 
*ssn
 
{{!}}}
 
{{NoteFormat|In order for Altocloud SDK forms tracking to capture form data, each input needs to have a properly defined <tt>name</tt> attribute.|}}
 
  
See also {{Link-SomewhereInThisVersion|manual=SDK|topic=Form_tracking_API}}.
+
For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Form_tracking_API}}.
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Signature
 
|sectionHeading=Signature
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
|gif=No
 
 
|structuredtext=<tt>ac('forms:track', [selector], [options]);</tt>
 
|structuredtext=<tt>ac('forms:track', [selector], [options]);</tt>
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Arguments
 
|sectionHeading=Arguments
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
|gif=No
 
 
|structuredtext=*[[#selector|selector]]
 
|structuredtext=*[[#selector|selector]]
 
*[[#options|options]]
 
*[[#options|options]]
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=selector
 
|sectionHeading=selector
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
|gif=No
+
|structuredtext=*'''Description:''' CSS selector for the element or elements to track
|structuredtext=*Description: The element you want to track.
+
*'''Type:''' String
*Type: string
+
*'''Status:''' Optional
*Status: optional
+
*'''Default:''' Form
*Default: form
 
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=options
 
|sectionHeading=options
|Type=Structured
 
 
|anchor=options
 
|anchor=options
 
|alignment=Vertical
 
|alignment=Vertical
|gif=No
+
|structuredtext=*'''Description:''' Activity or behavior to track
|structuredtext=*Description: The activity or behavior that you want to track.
+
*'''Type:''' Object
*Type: object
+
*'''Status:''' Optional
*Status: optional
+
*'''Default:''' {}
*Default: {}
+
*'''Properties:''' See the following table.
*Properties:
 
  
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
Line 94: Line 61:
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}captureFormDataOnAbandon
 
{{!}}{{!}}captureFormDataOnAbandon
{{!}}{{!}}<br />
+
{{!}}{{!}}
{{!}}{{!}}boolean
+
{{!}}{{!}}Boolean
 
{{!}}{{!}}optional
 
{{!}}{{!}}optional
 
{{!}}{{!}}true
 
{{!}}{{!}}true
{{!}}{{!}} 
+
{{!}}{{!}}
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}captureFormDataOnSubmit
 
{{!}}{{!}}captureFormDataOnSubmit
{{!}}{{!}}<br />
+
{{!}}{{!}}
{{!}}{{!}}boolean
+
{{!}}{{!}}Boolean
 
{{!}}{{!}}optional
 
{{!}}{{!}}optional
 
{{!}}{{!}}true
 
{{!}}{{!}}true
{{!}}{{!}} 
+
{{!}}{{!}}
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}transform
 
{{!}}{{!}}transform
{{!}}{{!}}<br />
+
{{!}}{{!}}
 
{{!}}{{!}}function
 
{{!}}{{!}}function
 
{{!}}{{!}}optional
 
{{!}}{{!}}optional
{{!}}{{!}}<br />
+
{{!}}{{!}}
 
{{!}}{{!}}formDataObject
 
{{!}}{{!}}formDataObject
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}traitsMapper
 
{{!}}{{!}}traitsMapper
{{!}}{{!}} 
+
{{!}}{{!}}
 
{{!}}{{!}}traitsMapper
 
{{!}}{{!}}traitsMapper
{{!}}{{!}} 
+
{{!}}{{!}}
{{!}}{{!}} 
+
{{!}}{{!}}
{{!}}{{!}} 
+
{{!}}{{!}}
{{!}}}
+
{{!}}-
|fullwidth=No
+
{{!}}customAttributes
 +
{{!}}Field used to send additional information when a form-related event occurs. The field can be set with static, predetermined values. Once the form tracker module initiates, the value that is available in the value field is applied for the rest of the session. The value cannot be changed dynamically according to user action. There can be more than one field.
 +
{{!}}object
 +
{{!}}optional
 +
{{!}}
 +
{{!}}
 +
{{!}}}<br />
 +
====Example====
 +
To create an event to track the number of customers who sign themselves up from the sign-up page, use the customAttributes within the form:track SDK as follows:<syntaxhighlight lang="javascript">{
 +
captureFormDataOnSubmit: [
 +
'forms:track', 'sign-up-form', { captureFormOnSubmit: true, customAttributes: {formValue: 200}
 +
]
 +
}
 +
</syntaxhighlight>
 +
====Use events to track outcome value====
 +
<span> </span>
 +
 
 +
Use the attributes from the form:track SDK to {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Manage_outcomes|display text=track an outcome}} from {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_action_maps|display text=action maps}}. You can further use the value set within the SDK to the define the value of the outcome. In this example, the value of sign up is set at 200. This means that if the outcome value of the outcome stands at 2000, the total number of sign ups is 10 whose with a total value of 2000.
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Latest revision as of 13:00, September 20, 2022

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

Learn how to use theforms:track method to capture when visitors complete web-based forms.

Important
This article only applies to customers using web chat. If you are a Genesys Cloud CX customer, we encourage you to use the new web messaging feature to replace web chat.

Description

The forms:track method tracks form submission and abandonment events. By default, forms tracking captures form data when a visitor submits or abandons a form.

  • Recorded form data includes the values of all input, select, and text area fields.
  • Recorded form data excludes the values of hidden, submit, and password fields, along with any fields that contain any of the sensitive input strings.
Important
For Genesys Predictive Engagement SDK forms tracking to capture form data, each input requires a properly defined name attribute.

For more information, see Form Tracking API.

Signature

ac('forms:track', [selector], [options]);

Arguments

selector

  • Description: CSS selector for the element or elements to track
  • Type: String
  • Status: Optional
  • Default: Form

options

  • Description: Activity or behavior to track
  • Type: Object
  • Status: Optional
  • Default: {}
  • Properties: See the following table.
Name Description Type Status Default Arguments
captureFormDataOnAbandon Boolean optional true
captureFormDataOnSubmit Boolean optional true
transform function optional formDataObject
traitsMapper traitsMapper
customAttributes Field used to send additional information when a form-related event occurs. The field can be set with static, predetermined values. Once the form tracker module initiates, the value that is available in the value field is applied for the rest of the session. The value cannot be changed dynamically according to user action. There can be more than one field. object optional

Example

To create an event to track the number of customers who sign themselves up from the sign-up page, use the customAttributes within the form:track SDK as follows:
{
captureFormDataOnSubmit: [
'forms:track', 'sign-up-form', { captureFormOnSubmit: true, customAttributes: {formValue: 200}
]
}

Use events to track outcome value

Use the attributes from the form:track SDK to track an outcome from action maps. You can further use the value set within the SDK to the define the value of the outcome. In this example, the value of sign up is set at 200. This means that if the outcome value of the outcome stands at 2000, the total number of sign ups is 10 whose with a total value of 2000.

Retrieved from "https://all.docs.genesys.com/ATC/Current/SDK/Forms:track (2024-07-27 23:21:54)"
Comments or questions about this documentation? Contact us for support!