# How to interact with trusted events in a Browser Clickpath Monitor

**URL:** <https://community.dynatrace.com/t/how-to-interact-with-trusted-events-in-a-browser-clickpath-monitor/41466>\
**Category:** Troubleshooting\
**Tags:** browser-monitors, synthetic-monitoring\
**Created:** [August 31, 2023, 4:03pm UTC](https://community.dynatrace.com/t/how-to-interact-with-trusted-events-in-a-browser-clickpath-monitor/41466 "2023-08-31T16:03:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [August 31, 2023, 4:03pm UTC](https://community.dynatrace.com/t/how-to-interact-with-trusted-events-in-a-browser-clickpath-monitor/41466/1 "2023-08-31T16:03:36Z")

</div>

## Summary

Some applications check whether an action was completed by a real user using the [isTrusted property](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted). Synthetic users don’t pass this check out of the box, so we need to update the script to change this.

## Resolution

With the snippet below, Browser Clickpath Monitors can click and enter keystrokes in applications that require the events to be trusted.

- Trusted events impact only Click and Keystroke steps; no other steps’ behavior is impacted by the flag, including JavaScript steps.
- The trusted Click step has the following limitations:  
the click may not work when
  - An element is behind another element (overlay) like Cookie consent popup
    - Consider introducing a synthetic step to remove the overlay before proceeding with trusted events (like adding click step to accept/reject Cookie consent popup).

  - An element is inside an iframe (trusted event in iframe are supported since 1.331)

## Supported Versions

This feature was added:

- For Clicks, from 1.266 (1.266 Recorder, 1.266 Public Locations, 1.267 Synthetic-enabled ActiveGates).
- For Keystrokes, from 1.269 (1.269 Recorder, 1.269 Public Locations, 1.269 Synthetic-enabled ActiveGates)

## 

How to enable interacting with trusted events in a Browser Clickpath monitor

Add the following to the configuration section of the script to enable Trusted Events feature

```auto
,"experimentalProperties": [
      {
          "name": "enableTrustedEvents",
          "value": "true"
      }
]

```

 ![HannahM_0-1692779119210.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/56432494eb9124ff483475d49cf08ff94e0a7c9f.png)

No further changes are required to the monitor. Now all click and keystroke events in the script will be considered trusted.

## How to remove/ disable an experimental property

If this experimental property is no longer required, remove the property that was added:

- **Latest Dynatrace Synthetic app:** Open **Advanced Setup** → **Experimental properties** and delete the property entry.
- **Classic Synthetic:** Remove the corresponding code snippet from the monitor’s `experimentalProperties` section, or the entire `experimentalProperties` block if no other experimental properties are configured.

After removing the property, save the monitor and execute it again to validate that it runs successfully.

## What’s Next

If this does not resolve the issue, please open a support ticket and provide

- a link to the affected monitor
- mention this article and any other troubleshooting steps taken

**What to read next:**

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Script mode for Browser monitor configuration](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/browser-monitors/script-mode-for-browser-monitor-configuration#edit-the-script)

[![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
Synthetic Troubleshooting Map](https://community.dynatrace.com/topic/250426)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Synthetic Browser Monitor Error Codes](https://community.dynatrace.com/topic/198177)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[How to perform a click event using Javascript on browser clickpath synthetic monitors](https://community.dynatrace.com/topic/244503)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[How to inspect and add the shadow DOM elements into synthetic script events.](https://community.dynatrace.com/topic/209228)
