google-adsense icon indicating copy to clipboard operation
google-adsense copied to clipboard

Does this library handle adsense pageviews correctly?

Open HarveyPeachey opened this issue 4 years ago • 0 comments

Didn't want to write an issue, but the repo doesn't have discussions so there's no other way to ask questions.

I'm implementing adsense in React, and an issue that I've come across with client-side route changes is that page views are only captured on the initial visit of a page. For example:

  1. User visits foobar.com
  2. Single ad unit is loaded
  3. 1 page view and 1 impression is sent to adsense
  4. User navigates with client-side routing to foobar.com/foo
  5. Single ad unit is automatically refreshed
  6. No page view but 1 impression is sent
  7. User has visited 2 pages, only the initial load page view is sent but 2 impressions are sent

Does this library implement a fix for this issue at all? I've had a read through the source code but I can't find anything specifically that would be a solution to this issue.

Do users of this library get correct page view reporting within adsense?

HarveyPeachey avatar Jan 07 '22 16:01 HarveyPeachey