Support » Plugin: Rank Math SEO - Best SEO Plugin for WordPress » Manually add UA code?

  • Resolved Jon Fuller


    Is it not possible to manually add a UA code for Google Analytics tracking? The only way is to connect it through a Rank Math account? 🙁

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rank Math


    Hello @freshyjon,

    Thank you for contacting the support.

    You can add the code in your theme’s functions.php file or use a 3rd party plugin to insert the code in your header. Sorry to disappoint but that feature is unfortunately not available at this time.

    The Rank Math plugin’s Analytics module does way beyond installing the code. You can read all about that here:

    With that being said, there are existing feature requests, so I’ve added your vote to our internal suggestions lists. If your suggestions are something that we’re able to introduce, I’ll be sure to let you know.

    If there’s anything else we can help you with, please let us know. We are here to assist.

    Thread Starter Jon Fuller


    Yes, it would be ideal to manually add UA code when we’re not able to connect an account to a client’s Google Account.

    Being able to manually add the UA code and still have some functionality such as outbound tracking, etc. would be ideal.

    I don’t care about the Dashboard aspect of it.

    Plugin Author Rank Math


    Hello @freshyjon

    Sure. Whenever that feature is added to the plugin, we will let you know.

    In the meantime, if there’s anything else we can help you with, please let us know.

    We are here to assist.

    /* Describe what the code snippet does so you can remember later on */
    add_action('wp_head', 'your_function_name');
    function your_function_name(){


    Thread Starter Jon Fuller


    @antonio_09 — yes, I understand how/where to add typical scripts such as Google Analytics code. But it would be more user-friendly if the plugin allowed for manual entry of the UA ID itself. In addition, it would then be able to take advantage of the plugin’s other Analytics options such as file download event tracking, and external/outbound link event tracking.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.