# JS Code not gating page correctly

**URL:** <https://community.hubspot.com/t/js-code-not-gating-page-correctly/7464>\
**Category:** CMS Development\
**Created:** [January 25, 2018, 7:55pm UTC](https://community.hubspot.com/t/js-code-not-gating-page-correctly/7464 "2018-01-25T19:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiaPV](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miapv/32/54847_2.png) [@MiaPV](https://community.hubspot.com/u/MiaPV)\
**Post date:** [January 25, 2018, 7:55pm UTC](https://community.hubspot.com/t/js-code-not-gating-page-correctly/7464/1 "2018-01-25T19:55:06Z")

</div>

Got it solved, thank you!!

---

<div class="post-metadata">

**Author:** ![louiegerodiaz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/louiegerodiaz/32/78356_2.png) [@louiegerodiaz](https://community.hubspot.com/u/louiegerodiaz)\
**Post date:** [January 27, 2018, 12:34am UTC](https://community.hubspot.com/t/js-code-not-gating-page-correctly/7464/2 "2018-01-27T00:34:32Z")

</div>

Hi Mia,

This looks like it might need a bit more inspection (i.e look into the other relative files) in order to solve the issue. However, I can’t help but notice that there’s a **book code** (not sure if it’s valid) sitting right inside the code you have posted. But if it is indeed a valid one, you might want to amend your post and remove that line.

Hope this helps in some way!

- Louie
