Pathfora can send tracking events and the user data submitted to Lytics and Google Analytics. As long as your tags are all set up in the correct order, module data will be sent Lytics automatically. Below we will look at which data fields are sent in detail and their formats.
censorTrackingKeys
This option exposes the capability to censor keys from payloads sent into Lytics. Any keys included as strings, or matching patterns as regular expressions that should be omitted from all payloads.
censorTrackingKeys array of string and/or regular expressions |
|
Value | Behavior |
---|---|
array of strings | keys which match any of the strings exactly will be censored from any payloads sent to Lytics |
array of regular expressions | any key which matches any of the regular expression patterns will be censored from any payloads sent to Lytics |
// help ensure compliance with industry-specific PII regulations by censoring form data,
var widget = new pathfora.Form({
// other configuration options elided
censorTrackingKeys: [/pf-form/]
});
Lytics
As long as your Lytics JavaScript tag is loaded before the Pathfora tag, all event data and data collected from modules with user input will be sent to the the stream configured in your Lytics JavaScript tag. The following raw data fields can be sent to Lytics by Pathfora.
Attribute | Type | Value |
---|---|---|
pf-widget-id |
string | id of the module set in the config |
pf-widget-type |
string | type of the module |
pf-widget-layout |
string | layout of the module |
pf-widget-variant |
int | variant of the module |
pf-widget-event |
string | name of the event (see below) |
pf-widget-action |
string | custom tracking names for button click events as defined in confirmAction or cancelAction |
pf-form-username |
string | user submitted value of "name" field on module |
pf-form-title |
string | user submitted value of "title" field on module |
pf-form-email |
string | user submitted value of "email" field on module |
pf-form-message |
string | user submitted value of "message" field on module |
pf-form-company |
string | user submitted value of "company" field on module |
pf-form-phone |
string | user submitted value of "phone number" field on module |
pf-widget-event string |
|
Value | Behavior |
---|---|
show | module was displayed to the user |
close | module was closed by the user |
confirm | "confirm" CTA button was clicked by the user |
cancel | "cancel" button was clicked by the user |
submit | user submitted information from a form module |
subscribe | user submitted email from a subscription module |
unlock | user submitted information from a gate module |
hover | indicates that the user hovered over a button on the modal, name of button is recorded by pf-widget-action |
focus | indicates that a form element on a modal received focus, name of the form field is recorded by pf-widget-action |
form_started | indicates that a user began typing in a form element on the modal, name of the form field is recorded by pf-widget-action |
To verify that the event data fields are being sent properly to Lytics, you can simulate an action by interacting with your module and checking that the expected fields exist in the data streams section of your Lytics Account.
By default these fields are available as user fields so that you can use them in the creation of segments. If you need help using these fields or would like to map the user fields differently please contact your customer success representative success@getlytics.com
.
Google Analytics
To enable this data to be sent to Google Analytics set the enableGA
flag before loading any module configs in your code:
window.pathfora.enableGA = true;
If this flag is enabled, pathfora will send event data from the modules on your website to your Google Analytics account as long as it has access to the ga
function. This requires that you have the analytics.js snippet on your website loaded before the Pathfora tag. An event sent to Google Analytics by Pathfora will use the following attributes for event tracking:
Attribute | Type | Value |
---|---|---|
eventCategory | string | Lytics |
eventAction | string | [id of module] : [event name] |
The [event name]
signifier in eventAction will match the event names for the pf-widget-event
field sent to Lytics. However, if you've defined custom names in the confirmAction or cancelAction settings this will override the event name for those actions.