cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Synthetic Clickpath: Bypass an event

Hello,

Can synthetic monitor bypass an event?

Example - I've a monitor with 14 events (page by page recorded) now I want a page not to be monitored. Say page 10.

From page 9 synthetic will jump to page 11 as on the page 10 we've added reCAPTCHA validation, where synthetic bot won't be able to make & will lead to failure. Creating a false positive problem. Whereas the LIVE site would be fine.

Please assist.

Thanks

5 REPLIES 5

HannahM
Dynatrace Leader
Dynatrace Leader

If it's an event that you will never use, I would just delete it. Otherwise you can add a Javascript event in to check if the event is needed and if it's not skip it using on of the skip clickpath events options documented here 

Skip clickpath events

These methods skip events after completion of the current event.

  • api.skipNextSyntheticEvent()—Skips execution of the next event.
  • api.skipNextSyntheticEvents(n)—Skips execution of the next n consecutive events.
  • api.skipSyntheticEvent(eventIndex)—Skips execution of the event with the index eventIndex. Event index numbers start at 1 and match the event numbers displayed in the web UI.
  • api.skipSyntheticEvents(eventIndexes)—Skips execution of multiple events; the array eventIndexes specifies the indexes of events to skip, for example, api.skipSyntheticEvents([8, 9]).
Synthetic SME and community advocate.

Thanks Hannah

As per my example, if the event in b/w the sequence is deleted. It will mark my journey as failed.

Secondly - where to enter this api.skipNextSyntheticEvent()? is it in the script? 

 

I'm not sure I understand. Do you need the event to be executed or skipped? 

Synthetic SME and community advocate.

Skipped

So, if you always want to skip it, I would just delete the event. Otherwise you are adding an extra event in just to say 'skip the next event'. 
If you might need the event to be executed in only certain circumstances then you can add a JavaScript event before the one you want to skip which can test whether it should be skipped or not

// Choose whether to skip next event
var element = document.getElementById("CSS ID of the relevant element");

// Check to see if the element exists
if (element === null) {
    // Element not found so skip the next event
    api.skipNextSyntheticEvent();
} else {
    // Element found, continue to execute next event
}

 

Synthetic SME and community advocate.

Featured Posts