# Custom code in page load appears randomly in production

**URL:** <https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999>\
**Category:** Ask us anything\
**Created:** [December 18, 2023, 7:03pm UTC](https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999 "2023-12-18T19:03:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![felix](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@felix](https://community.weweb.io/u/felix)\
**Post date:** [December 18, 2023, 7:03pm UTC](https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999/1 "2023-12-18T19:03:44Z")

</div>

I added a custom code for a live chat capability on a specific page.  
It worked in production; then, I added another analytics code, and the custom live chat code disappeared.  
I reverted to the previous working version, to no avail.  
After a dozen publishing tries, I quit.

Is it reliable? Are there things we should know?

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [December 19, 2023, 11:54am UTC](https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999/2 "2023-12-19T11:54:12Z")

</div>

Hi @felix 👋

It should be reliable, yes.

Custom code can appear if scripts are not added in the correct place or if tags are not closed properly for example (this is not a WeWeb thing by the way. [it’ll happen in code and other no-code tools as well](https://stackoverflow.com/questions/66291127/javascript-and-css-code-literally-appearing-on-my-html-page)).

Can you share some screenshots of where you added the custom code in your project so we can help you debug?

---

<div class="post-metadata">

**Author:** ![felix](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@felix](https://community.weweb.io/u/felix)\
**Post date:** [December 19, 2023, 1:04pm UTC](https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999/3 "2023-12-19T13:04:25Z")

</div>

Hi @Joyce, sure.

The script is not pushed in production when added on this static collection page

 ![Capture d’écran 2023-12-19 à 14.00.14](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/19d7acd518e5ca62c58d43e3626ddd1e19dd2282.png)

But it works perfectly when added to the whole project

 ![Capture d’écran 2023-12-19 à 14.00.38](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/4aa9ee3e259683c0e32b9c3469b08f64ec1b3624.png)

BTW: the validation error messages are overkill.

---

<div class="post-metadata">

**Author:** ![Quentin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/quentin/32/6_2.png) [@Quentin](https://community.weweb.io/u/Quentin)\
**Post date:** [December 29, 2023, 10:21am UTC](https://community.weweb.io/t/custom-code-in-page-load-appears-randomly-in-production/5999/4 "2023-12-29T10:21:12Z")

</div>

Could you file a bug ticket on [support.weweb.io](http://support.weweb.io)? We’ll have a look! Thanks
