# Sessions vs entrance ?

**URL:** <https://community.hubspot.com/t/sessions-vs-entrance/18530>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [February 4, 2020, 11:02am UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530 "2020-02-04T11:02:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![banstola](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/banstola/32/95715_2.png) [@banstola](https://community.hubspot.com/u/banstola)\
**Post date:** [February 4, 2020, 11:02am UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530/1 "2020-02-04T11:02:23Z")

</div>

Hi,

We have a bit of confusion over terms when using

`analytics/v2/reports/blog-posts/daily?start=20200101&end=20200131&limit=1000&f={blog-id}`

Does the value of the entrance represent session?

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [February 4, 2020, 3:09pm UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530/2 "2020-02-04T15:09:11Z")

</div>

Hi @banstola

To confirm, entrances is defined by HubSpot as the following:

`Entrances: the number of times that a page was the first one viewed in a session.`

So as an example, if I am to use the following query:

```auto
Get a summary of the top 10 blog posts by entrances (the page was the first page viewed in a session):
https://api.hubapi.com/analytics/v2/reports/blog-posts/total?hapikey=demo&start=20180101&end=20180301&sort=entrances&limit=10

```

This yields the following response:

```auto
Example Response:
{
 "offset": 3,
 "total": 11,
 "totals": {
 "rawViews": 258,
 "ctaViews": 2,
 "submissions": 4,
 "leads": 4,
 "contacts": 4,
 "entrances": 19,
 "exits": 19,
 "timePerPageview": 43.751937984496124,
 "pageBounceRate": 0.3684210526315789,
 "exitsPerPageview": 0.07364341085271318
 }

```

We’re going to see that in the data returned for these top 10 blog posts, there are 19 occaisions where they are the first post viewed in a session during this timeframe.

I hope this helps!

---

<div class="post-metadata">

**Author:** ![banstola](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/banstola/32/95715_2.png) [@banstola](https://community.hubspot.com/u/banstola)\
**Post date:** [February 6, 2020, 8:22am UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530/3 "2020-02-06T08:22:14Z")

</div>

Hi @Willson ,

Thank you for your answer. It helps to clear things up a little bit more. I am sorry if I was not entirely clear. I am talking about the following endpoint when we are querying for data daily. For example, when calling the following endpoint.

`analytics/v2/reports/blog-posts/daily?start=20191201&end=20191231&limit=1000&f={filter}`

Response is

```auto
{
    "2019-12-18": [
        {
            "breakdown": "{placeholder}",
            "contactsPerPageview": 0.0625,
            "exitsPerPageview": 0.1875,
            "rawViews": 16,
            "pageTime": 1265,
            "standardViews": 16,
            "opportunities": 1,
            "pageBounceRate": 0.5,
            "exits": 3,
            "submissionsPerPageview": 0.125,
            "pageviewsMinusExits": 13,
            "submissions": 2,
            "pageBounces": 1,
            "timePerPageview": 97.3076923076923,
            "entrances": 2,
            "contacts": 1
        }
    ],
}

```

How was the page bounce rate of 0.5 calculated as we see in the response? Is the formula pageBounces/entrances = pageBounceRate correct in this context?

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [February 6, 2020, 9:43am UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530/4 "2020-02-06T09:43:26Z")

</div>

Hi @banstola

The pageBounce rate is actually defined as the following:

`The number of sessions with only one page view divided by the total number of sessions`

The numbers returned in the request you’re making are not actually the numbers being used to calculate this value you’re seeing, instead this is calculated internally and then outputted as a result for this endpoint.

I hope this helps!

---

<div class="post-metadata">

**Author:** ![banstola](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/banstola/32/95715_2.png) [@banstola](https://community.hubspot.com/u/banstola)\
**Post date:** [February 10, 2020, 12:41pm UTC](https://community.hubspot.com/t/sessions-vs-entrance/18530/5 "2020-02-10T12:41:11Z")

</div>

I tested with various date range and I was able to verify that Bounce Rate that users see at dashboard is actually the percentage of pageBounces / entrance from API ?
