How do I use the dashboard only (ie: do not add UA code to website)

I already have another method for adding my Google Analytics code to my site. Therefore, I just want to use the dashboard only. Is there a way I can ensure the plugin does not add any GA/UA code to the front-end of my site?

  • Sajid

    Hi Eric,
    Hope you are doing good today :slight_smile:

    I am unable to reproduce this issue on my end. When I delete the code from Site Tracking Code field and save changes it does not revert it back.

    The only thing that I doubt which can cause this issue is that you might be logged in to google. If yes then click on Logout from Google account button in Settings -> Google Analytics and then check again.

    If that does not work, then could you please enable support staff access so I can take a closer look ? I will be deleting the UA code from the field try saving the changes. You can grant access from WPMU DEV -> Support -> Support Access -> Grant Access or see this manual.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Sajid

    Hi Eric,
    Hope you are doing good today :slight_smile:

    I come up with following code based solution for you to remove the tracking code from frontend of your website.

    Try adding below code in functions.php file of your child theme or download the attached file, extract it and move it to ../wp-content/mu-plugins.

    add_action('init', 'wpmu_remove_my_action_hooks');
    function wpmu_remove_my_action_hooks(){
    	global $google_analytics_async;
    	remove_action( 'wp_head', array( &$google_analytics_async, 'tracking_code_output' ) );

    I have tested this code before suggesting but it is still recommended to take a full backup of your website first using Snapshot plugin.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.