# How to return a constant variable from custom js?

**URL:** <https://community.piwik.pro/t/how-to-return-a-constant-variable-from-custom-js/210>\
**Category:** Data collection and tags\
**Created:** [July 21, 2021, 10:26am UTC](https://community.piwik.pro/t/how-to-return-a-constant-variable-from-custom-js/210 "2021-07-21T10:26:12Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![kamilb](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kamilb/32/309_2.png) [@kamilb](https://community.piwik.pro/u/kamilb)\
**Post date:** [January 23, 2025, 2:00pm UTC](https://community.piwik.pro/t/how-to-return-a-constant-variable-from-custom-js/210/8 "2025-01-23T14:00:32Z")

</div>

Hi @joao,

No worries, when it comes to the question about variables it seems that it was already answered in another thread - [Custom JS variable evaluated multiple times per page - #6 by mbaersch](https://community.piwik.pro/t/custom-js-variable-evaluated-multiple-times-per-page/3927/6)

Have a great day! 🙂

---

_[View the full topic](https://community.piwik.pro/t/how-to-return-a-constant-variable-from-custom-js/210)._
