Skip to content

bounceRate and exitRate always coming back 0 or 100 #21

@davatron5000

Description

@davatron5000

Thanks for this repo. It really makes dealing with the Google Analytics API a lot easier.

I'm running into an issue where bounceRate and exitRate are always coming back either 0 or 100 when using node-simple-ga, but it wasn't doing that when I was using the GA api directly. Any ideas? I've tried camelCase and all lowercase but still get the same data back

Request:

const request = Request()
  .select(
    'pagepath',
    'pageviews',
    'users',
    'sessions',
    'avgtimeonpage',
    'bouncerate',
    'exitrate'
  )
  .from(XXXXXXX)
  .where('pagepath')
  .is('/')
  .period('2021-12-01', '2021-12-21')

const response = await analytics.run(request)

Response:

[{
  users: 1627,
  exitRate: 0,
  pagePath: '/',
  sessions: 1951,
  pageviews: 2296,
  bounceRate: 0,
  avgTimeOnPage: 65
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions