Data Element Auto Selection Feature
What It Does
When a user selects an element on a page and opens the extension popup, the extension checks if it has a stored record for that element. If a match is found, the data element and operation dropdowns are pre-selected automatically. This saves the user from manually choosing the same values on repeat visits.
When Data Element Auto-Selection Occurs
The extension runs the SuggestionMatcher every time a user selects an element and the popup opens. It checks the following in order:
data-pty-dataelementattribute — If the element has this HTML attribute and its value matches a configured data element, that data element is pre-selected immediately.Custom mapping — If a custom mapping config exists and the current domain + element matches an admin-defined rule, the mapped data element and operation are pre-selected.
Stored suggestions — If neither of the above applies:
- The current page URL is compared against previously stored documents.
- If the URL matches, the current element is compared against stored suggestions for that document using weighted scoring (id, xpath, custom attributes, table column name, context xpaths).
- An exact match or a score above the confidence threshold (default
0.5) results in pre-selection of the stored data element and operation. Among multiple matches, the one with the highestmatch_frequencywins.
If nothing matches, the dropdowns remain empty and the user selects manually.
When a Suggestion Gets Saved
After the user completes a protect or unprotect operation:
- If the element matched an existing suggestion and the user kept the same data element, the suggestion’s
match_frequencyis incremented. - If the element matched but the user chose a different data element, the suggestion is updated accordingly.
- If no match existed, a new suggestion is saved with the element’s identifying properties, the chosen data element, and operation.
Relationship to “Process Page Content” Settings
The popup settings Process Page Content Automatically and Process Page Content based on past usage are unrelated to data element auto-selection. Those settings control whether the extension automatically processes elements on page load without user interaction.
If a user has processed the same data on the page 3 or more times, if they have the “Process Page Content based on past usage” turned ON, that data will be automatically processed.
Meaning this feature won’t be able to be used for those pieces of data, but any data that has been processed by the user but has not been processed atleast 3 times, will still have its data element and operation auto selected.