# what libraries are supported in javascript synthetic event?

**URL:** <https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577>\
**Category:** Synthetic Monitoring\
**Tags:** http-monitor, browser-monitors, synthetic-monitoring\
**Created:** [March 22, 2022, 12:19pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577 "2022-03-22T12:19:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhlamine](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mhlamine/32/4415_2.png) [@mhlamine](https://community.dynatrace.com/u/mhlamine)\
**Post date:** [March 22, 2022, 12:19pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/1 "2022-03-22T12:19:14Z")

</div>

We need to add some token generation code in javascript before some steps in synthetic monitoring.

What is supported and what is not in javascript synthetic event?

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [March 22, 2022, 12:48pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/2 "2022-03-22T12:48:53Z")

</div>

Hello&nbsp;[@mhlamine](https://community.dynatrace.com/user/41730)

By default, Dynatrace tries to use the same settings as configured for the real user monitoring application visited by the synthetic monitor to generate comparable data. If you enable the advanced settings, these settings will be used instead.  
 ![Babar_Qayyum_0-1647953297152.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/2/12dae1a0aa957423e1583c387bb3252d47d4c376.png)

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![mhlamine](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mhlamine/32/4415_2.png) [@mhlamine](https://community.dynatrace.com/u/mhlamine)\
**Post date:** [March 22, 2022, 12:53pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/3 "2022-03-22T12:53:46Z")

</div>

we are talking about synthetic monitoring javascript event here not RUM.

i have a http monitor or browser monitor and i need to add a step to calculate a variable that i will use in my monitor.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [March 22, 2022, 1:01pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/4 "2022-03-22T13:01:39Z")

</div>

Hello&nbsp;[@mhlamine](https://community.dynatrace.com/user/41730)

Oops! I misunderstood.

I am not sure whether you had already gone through with the below and was this helpful in your case or not.

> **[Script mode for browser monitor configuration in Classic](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/browser-monitors/script-mode-for-browser-monitor-configuration)**
>
> Create or edit your browser monitors in JSON format.

Regards,

Babar

---

<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:** [March 22, 2022, 1:04pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/5 "2022-03-22T13:04:11Z")

</div>

We support a subset of JavaScript libraries. I doubt it includes token generation. However, you can just paste in the library code. I know customers successfully do this for CryptoJS for instance

---

<div class="post-metadata">

**Author:** ![mhlamine](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mhlamine/32/4415_2.png) [@mhlamine](https://community.dynatrace.com/u/mhlamine)\
**Post date:** [March 22, 2022, 1:24pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/6 "2022-03-22T13:24:15Z")

</div>

Hi Hannah,

we need to use&nbsp; : ajax/libs/forge/0.9.1/forge.min.js

Regards.

---

<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:** [March 22, 2022, 2:46pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/7 "2022-03-22T14:46:07Z")

</div>

Yes, you would need to add the code from the js into the pre-execution script. Since the js is 283kb, it is above the default size for pre-execution scripts, 50kb, so for the moment, you will need to create a Support ticket and request that this setting is increased. Soon you will be able to do this in the monitor itself, in a new Advanced Settings tab. 🙂

---

<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:** [March 23, 2022, 4:21pm UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/8 "2022-03-23T16:21:00Z")

</div>

Apologies, on having checked further, the maximum size for a pre-execution script is 100kb, so unfortunately not large enough for this js. I have mentioned this scenario to the Team Captain for this.

---

<div class="post-metadata">

**Author:** ![mhlamine](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mhlamine/32/4415_2.png) [@mhlamine](https://community.dynatrace.com/u/mhlamine)\
**Post date:** [March 24, 2022, 8:50am UTC](https://community.dynatrace.com/t/what-libraries-are-supported-in-javascript-synthetic-event/34577/9 "2022-03-24T08:50:09Z")

</div>

it is strange because in the browser monitor javascript synthetic event there is no limit to the script size.
