Google Analytics Pageview Decrease When Tracking with Rank Math

#224904
  • Resolved Aly B
    Rank Math free

    Hi,

    After switching to Rank Math, I decided to use the Google Analytics function rather than my usual GA plugin. I then noticed a sudden, significant decrease in time on page, a decrease in pages per session, and an increase in bounce rate over that period. (My unique users stayed within a normal range.)

    I disabled the GA insertion with Rank Math and went back to my GA plugin, and the stats normalized. To test the theory, I then enabled GA through Rank Math again and observed the same behavior.

    Do you have any idea why simply inserting GA code through the Rank Math plugin might make such a difference in my stats? Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Ankit
    Rank Math business

    Hello,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Could you please check the page source if you multiple UA- codes inside it? There might be a possibility of it. Would you mind trying to flush the cache from the plugin to make sure that the page is fresh and updated?

    If that is not the case do let us know that we can troubleshoot he issue further also please share the URL of your website inside the sensitive data section.

    Looking forward to helping you. Thank you.

    Aly B
    Rank Math free

    I have confirmed 0 GA codes when I have both plugins disabled. Then, when I use just RankMath to install the Analytics code, I see three instances of UA- in my source code. I do have it set to exclude logged-in users, which explains why one of the codes is there.

    How is the insertion supposed to look in the source code? Should it be like this?

    I do flush my cache after every update.

    Thanks!

    Ankit
    Rank Math business

    Hello,

    Please kindly enable only the Rank Math analytics code, and also, please share the URL of your website to look into it from our end.

    Looking forward to helping you. Thank you.

    Aly B
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anas
    Rank Math business

    Hello,

    Hello,

    When you enable the Install Analytics code option, Rank Math adds two script tags to the code.

    One with id='google_gtagjs-js' and the other with id='google_gtagjs-js-after'

    There are only two instances of UA- in the page source, here is how the page source looks like:
    ua

    If you are seeing more than two instances of UA- in the page source, please check if you have added the code manually or with some other plugin.

    I hope this helps.

    Looking forward to helping you.

    Aly B
    Rank Math free

    When I disable Rank Math, I have 0 instances of UA-, though, which is the odd thing that any other plugin would be inserting that third UA-.

    Ankit
    Rank Math business

    Hello,

    The insertion of Google analytics code seems to be looking good on your staging website. Would you mind sharing your main site, Since the issue is occurring on your main website?

    Looking forward to helping you. Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Google Analytics Pageview Decrease When Tracking with Rank Math’ is closed to new replies.