[Support request] Google analytics code in hook / wp_head

Home Forums Support Google analytics code in hook / wp_head

  • This topic has 1 reply, 2 voices, and was last updated 1 year ago by David.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1010550
    Kristian Ole

    i would like to use hook instead of installing a plugin to add the Google Analtyics code on my site: https://vpnservice.dk/
    Will it work to add the analytics code in hook / wp_head and then display on entire_site?

    #1010553
    David
    Staff
    Customer Support

    Hi there,

    yes, thats correct, the WP_head hook is within the <head> element of the site.
    Then set Display Rules for the Entire Site.

    Extra bonus, on the Display Rules set User > Logged Out – this will stop the script from running for Authority ( Logged in ) users.

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