leadconduit-trustedform 2.4.7 → 2.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,7 +65,8 @@ const formatProperties = (insights) => {
65
65
  { mapping: 'operating_system', value: 'os' },
66
66
  { mapping: 'page_url', value: 'page_url' },
67
67
  { mapping: 'parent_page_url', value: 'parent_page_url' },
68
- { mapping: 'time_on_page', value: 'seconds_on_page' }
68
+ { mapping: 'time_on_page', value: 'seconds_on_page' },
69
+ { mapping: 'bot_detected', value: 'bot_detected' }
69
70
  ];
70
71
 
71
72
  let selectedProps = insightsProps.map((field) => {
@@ -105,6 +106,7 @@ request.variables = () => [
105
106
  { name: 'insights.time_on_page', type: 'boolean', required: false, description: 'Request TrustedForm Insights time on page data?' },
106
107
  { name: 'insights.page_url', type: 'boolean', required: false, description: 'Request TrustedForm Insights page URL data?' },
107
108
  { name: 'insights.page_scan', type: 'boolean', required: false, description: 'Request TrustedForm Insights page scan data?' },
109
+ { name: 'insights.bot_detected', type: 'boolean', required: false, description: 'Request TrustedForm Insights bot detection data?' },
108
110
  { name: 'trustedform.scan_required_text', type: 'array', required: false, description: 'A list of required text to scan for. TrustedForm will then perform a case and whitespace insensitive search for the string.' },
109
111
  { name: 'trustedform.scan_forbidden_text', type: 'array', required: false, description: 'A list of forbidden text to scan for. TrustedForm will then perform a case and whitespace insensitive search for the string.' },
110
112
  { name: 'trustedform.scan_delimiter', type: 'string', required: false, description: 'Use this parameter to designate a delimiter when wrapping wildcards or template variables; defaults to |.' },
@@ -128,7 +130,8 @@ const verifyEnabled = (vars) => vars.trustedform?.verify?.valueOf();
128
130
  const hasRequiredRetainProps = (vars) => !!(vars.lead.email || vars.lead.phone_1);
129
131
  const hasAtLeastOneInsightsProp = (vars) => formatProperties(vars.insights).length > 0 || vars.insights?.page_scan?.valueOf();
130
132
  const hasVerifyData = (data) => {
131
- return data.verify?.languages || data.verify?.result?.language_approved || data.verify?.result?.success || data.verify?.result?.one_to_one;
133
+ return data.verify?.languages
134
+ || data.verify?.result;
132
135
  };
133
136
 
134
137
  const response = (vars, req, res) => {
@@ -139,10 +142,12 @@ const response = (vars, req, res) => {
139
142
  const verify = hasVerifyData(parsed)
140
143
  ? pickBy({
141
144
  languages: parsed.verify.languages.map(lang => lang.text),
142
- form_submitted: parsed.verify.result.form_submitted,
143
- language_approved: parsed.verify.result.language_approved,
145
+ form_submitted: parsed.verify.result?.form_submitted,
146
+ language_approved: parsed.verify.result?.language_approved,
147
+ font_size: parsed.verify.result?.min_font_size_px_satisfied,
148
+ contrast_ratio: parsed.verify.result?.min_contrast_ratio_satisfied,
144
149
  // note that the Verify one_to_one value is handled separately
145
- success: parsed.verify.result.success,
150
+ success: parsed.verify.result?.success,
146
151
  }, (v) => !isUndefined(v))
147
152
  : undefined;
148
153
 
@@ -194,6 +199,7 @@ const response = (vars, req, res) => {
194
199
  os_name: parsed.insights?.properties?.os?.name,
195
200
  page_url: parsed.insights?.properties?.page_url,
196
201
  parent_page_url: parsed.insights?.properties?.parent_page_url,
202
+ bot_detected: parsed.insights?.properties?.bot_detected,
197
203
  one_to_one: parsed.verify?.result?.one_to_one,
198
204
  verify
199
205
  }, (v) => { return !isUndefined(v); });
@@ -270,11 +276,14 @@ response.variables = () => [
270
276
  { name: 'os_name', type: 'string', description: 'Operating system name' },
271
277
  { name: 'page_url', type: 'string', description: 'The URL of the page hosting TrustedForm Certify.' },
272
278
  { name: 'parent_page_url', type: 'string', description: 'The parent URL of the page hosting TrustedForm Certify, if framed.' },
279
+ { name: 'bot_detected', type: 'boolean', description: 'A boolean indicating whether the events documented were likely produced by a non-human entity based on ActiveProspect\'s proprietary algorithms.' },
273
280
  { name: 'one_to_one', type: 'boolean', description: 'A boolean indicating if the cert structure satisfied the requirements for 1:1 consent.' },
274
281
  { name: 'verify.languages', type: 'array', description: 'A list of the consent languages detected within the certificate' },
275
282
  { name: 'verify.language_approved', type: 'boolean', description: 'A boolean indicating if any of the consent languages found have been approved in your account\'s consent language manager.' },
276
283
  { name: 'verify.form_submitted', type: 'boolean', description: 'A boolean indicating whether the form was successfully submitted by the consumer.' },
277
284
  { name: 'verify.success', type: 'boolean', description: 'A boolean indicating if any of the consent languages found meet the success criteria defined for your account.' },
285
+ { name: 'verify.font_size', type: 'boolean', description: 'True when the consent language font size meets or exceeds the value configured in TrustedForm.' },
286
+ { name: 'verify.contrast_ratio', type: 'boolean', description: 'True when the contrast ratio between the consent language text and background meets or exceeds the value configured in TrustedForm.' }
278
287
  ];
279
288
 
280
289
  const editable = true;
@@ -29,6 +29,11 @@ module.exports = {
29
29
  description: 'Whether or not the lead event took place inside of an iframe. <a href="https://www.techtarget.com/whatis/definition/IFrame-Inline-Frame" target="_blank">Learn More.</a>',
30
30
  enabled: false
31
31
  },
32
+ bot_detected: {
33
+ name: 'Bot Detection',
34
+ description: 'A determination of whether the events documented were likely produced by a non-human entity based on ActiveProspect’s proprietary algorithms. <a href="https://community.activeprospect.com/posts/5424099" target="_blank">Learn more.</a>',
35
+ enabled: false
36
+ },
32
37
  form_input_method: {
33
38
  name: 'Form Input Method',
34
39
  description: 'A list of ways the consumer input their data onto the form including one or more of the following: typing, paste, autofill.',