leadconduit-trustedform 2.5.0 → 2.7.0

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.
@@ -6,6 +6,8 @@
6
6
  - [ ] Bug fix (non-breaking change that fixes an issue)
7
7
  - [ ] New feature (non-breaking change that adds functionality)
8
8
  - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9
+ - [ ] UI Change Only
10
+ - [ ] Chore
9
11
  - [ ] Configuration change
10
12
  - [ ] Technical Debt
11
13
  - [ ] Documentation
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org)
4
4
 
5
+ ## [2.6.0] - 2025-05-05
6
+ ### Added
7
+ - v4 Verify now appends `opt_in_type`, based on `opt_in_types_satisfied` ([sc-90678](https://app.shortcut.com/active-prospect/story/90678/trustedform-v4-verify-include-opt-in-types-satisfied-as-an-appended-field))
8
+
5
9
  ## [2.5.0] - 2025-04-08
6
10
  ### Added
7
11
  - v4 now includes CPL token when present ([sc-87918](https://app.shortcut.com/active-prospect/story/87918/send-cpl-data-to-trustedform))
@@ -1,6 +1,7 @@
1
1
  const helpers = require('./helpers');
2
2
  const { compact, get, pickBy, isUndefined } = require('lodash');
3
3
 
4
+ /* eslint-disable-next-line complexity */
4
5
  const request = (vars) => {
5
6
  const { lead, trustedform, insights } = vars;
6
7
  const body = {};
@@ -80,7 +81,8 @@ const formatProperties = (insights) => {
80
81
  { mapping: 'page_url', value: 'page_url' },
81
82
  { mapping: 'parent_page_url', value: 'parent_page_url' },
82
83
  { mapping: 'time_on_page', value: 'seconds_on_page' },
83
- { mapping: 'bot_detected', value: 'bot_detected' }
84
+ { mapping: 'bot_detected', value: 'bot_detected' },
85
+ { mapping: 'confirmed_owner', value: 'confirmed_owner' }
84
86
  ];
85
87
 
86
88
  let selectedProps = insightsProps.map((field) => {
@@ -121,6 +123,7 @@ request.variables = () => [
121
123
  { name: 'insights.page_url', type: 'boolean', required: false, description: 'Request TrustedForm Insights page URL data?' },
122
124
  { name: 'insights.page_scan', type: 'boolean', required: false, description: 'Request TrustedForm Insights page scan data?' },
123
125
  { name: 'insights.bot_detected', type: 'boolean', required: false, description: 'Request TrustedForm Insights bot detection data?' },
126
+ { name: 'insights.confirmed_owner', type: 'boolean', required: false, description: 'Request TrustedForm Insights confirmed owner data?' },
124
127
  { 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.' },
125
128
  { 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.' },
126
129
  { name: 'trustedform.scan_delimiter', type: 'string', required: false, description: 'Use this parameter to designate a delimiter when wrapping wildcards or template variables; defaults to |.' },
@@ -160,6 +163,7 @@ const response = (vars, req, res) => {
160
163
  language_approved: parsed.verify.result?.language_approved,
161
164
  font_size: parsed.verify.result?.min_font_size_px_satisfied,
162
165
  contrast_ratio: parsed.verify.result?.min_contrast_ratio_satisfied,
166
+ opt_in_type: parsed.verify.result?.opt_in_types_satisfied,
163
167
  // note that the Verify one_to_one value is handled separately
164
168
  success: parsed.verify.result?.success,
165
169
  }, (v) => !isUndefined(v))
@@ -214,6 +218,7 @@ const response = (vars, req, res) => {
214
218
  page_url: parsed.insights?.properties?.page_url,
215
219
  parent_page_url: parsed.insights?.properties?.parent_page_url,
216
220
  bot_detected: parsed.insights?.properties?.bot_detected,
221
+ confirmed_owner: parsed.insights?.properties?.confirmed_owner,
217
222
  one_to_one: parsed.verify?.result?.one_to_one,
218
223
  verify
219
224
  }, (v) => { return !isUndefined(v); });
@@ -291,13 +296,15 @@ response.variables = () => [
291
296
  { name: 'page_url', type: 'string', description: 'The URL of the page hosting TrustedForm Certify.' },
292
297
  { name: 'parent_page_url', type: 'string', description: 'The parent URL of the page hosting TrustedForm Certify, if framed.' },
293
298
  { 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.' },
299
+ { name: 'confirmed_owner', type: 'string', description: 'A string indicating the verified owner of the domain, page, app, or site where the lead was generated.' },
294
300
  { name: 'one_to_one', type: 'boolean', description: 'A boolean indicating if the cert structure satisfied the requirements for 1:1 consent.' },
295
301
  { name: 'verify.languages', type: 'array', description: 'A list of the consent languages detected within the certificate' },
296
302
  { 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.' },
297
303
  { name: 'verify.form_submitted', type: 'boolean', description: 'A boolean indicating whether the form was successfully submitted by the consumer.' },
298
304
  { name: 'verify.success', type: 'boolean', description: 'A boolean indicating if any of the consent languages found meet the success criteria defined for your account.' },
299
305
  { name: 'verify.font_size', type: 'boolean', description: 'True when the consent language font size meets or exceeds the value configured in TrustedForm.' },
300
- { 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.' }
306
+ { 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' },
307
+ { name: 'verify.opt_in_type', type: 'boolean', description: 'True when all opt-in types on the form match one or more of the values configured in TrustedForm' }
301
308
  ];
302
309
 
303
310
  const editable = true;
@@ -34,6 +34,11 @@ module.exports = {
34
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
35
  enabled: false
36
36
  },
37
+ confirmed_owner: {
38
+ name: 'Confirmed Owner',
39
+ description: 'A string indicating the verified owner of the domain, page, app, or site where the lead was generated. <a href="https://community.activeprospect.com/posts/5871525" target="_blank">Learn More.</a>',
40
+ enabled: false
41
+ },
37
42
  form_input_method: {
38
43
  name: 'Form Input Method',
39
44
  description: 'A list of ways the consumer input their data onto the form including one or more of the following: typing, paste, autofill.',