Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendPageView should be called via requestAnimationFrame, when available #131

Open
d4h0 opened this issue Dec 13, 2020 · 1 comment
Open

Comments

@d4h0
Copy link

d4h0 commented Dec 13, 2020

Hi,

The following code of this plugin is based on code from gatsby-plugin-google-analytics:

    // Minimum delay for reactHelmet's requestAnimationFrame
    const delay = Math.max(32, 0)
    setTimeout(sendPageView, delay)

In browsers with a refresh rate higher than 60, this can lead to a bug (where the wrong title is sent).

You can find more information in the issue I have created for gatsby-plugin-google-analytics:

gatsby-plugin-google-analytics: sendPageView should be called via requestAnimationFrame, when available #28591

@jawakardurai
Copy link

I have the same issue, I also tried the solution mentioned here in local and tested using iphones in browserstack but didn't solve the issue, still pushing the previous page title.

This issue happens only in ios devices, mainly iphones. Haven't seen the issue happen in any other devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants