# Check the screen ID (aka page ID) of the user

**URL:** https://community.fliplet.com/t/check-the-screen-id-aka-page-id-of-the-user/367
**Category:** Code Library
**Created:** [July 1, 2022, 1:58pm UTC](https://community.fliplet.com/t/check-the-screen-id-aka-page-id-of-the-user/367 "2022-07-01T13:58:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mel](https://dub1.discourse-cdn.com/flex017/user_avatar/community.fliplet.com/mel/32/3_2.png) [@Mel](https://community.fliplet.com/u/Mel)
#### Post date: [July 1, 2022, 1:58pm UTC](https://community.fliplet.com/t/check-the-screen-id-aka-page-id-of-the-user/367/1 "2022-07-01T13:58:56Z")

</div>

### Get the screen ID of the screen the user is currently viewing

To get the screen ID of the current screen a user is viewing, you can use the following code:

**JavaScript**

```javascript
var usersScreenID = Fliplet.Env.get('pageId');

```

You could then check if the user is on a certain screen. To do this, first you retrieve the ID of the user’s current screen. Then, if the user’s screen ID matches the one you’re interested in (eg: if it matches 83495 in the example below) you can then run some custom code.

**JavaScript**

```javascript
var usersScreenID = Fliplet.Env.get('pageId');

if (usersScreenID === 83495) {
  // if the users current screen has the ID of 83495 then run some custom code here
}

```
