• I’m not sure where to paste the Google Analytics code for the Customizr home page with sliders; on the other pages I just edit the Page and paste it in. I don’t see any place in “Customize” to do it. I tried pasting it into the home page in the Pages section, but that doesn’t seem to be working, no data is coming through to GA. Can anyone tell me where I SHOULD be adding the GA code for the home page when I’m using Customizr’s slider?

    Site link is https://www.hiptrac.com if that is helpful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    and what about archives (all the lists of posts, like archives, categories, tags, search results?)
    this snippet tells you how to add GA in the head tag, so for all pages:
    https://themesandco.com/snippet/adding-google-analytics-customizr/

    once you did that you can get rid of the GA code you put in the page/post contents.

    Hope this helps.

    p.s.
    if you still want to keep the GA in page/post content (not suggested, google suggests to put it in the head tag, I think ) take a look at the wordpress conditional tags.

    Thread Starter hptccharge

    (@hptccharge)

    Putting it in the head tag sounds like the right way to do it, but the snippet has a warning that it may not work in Customizr 3.2, which I am using (I’ve run into other issues on 3.2).

    Also, can I use the snippet if I don’t have a child theme? Without a child theme do I lose the head tags if I upgrade Customizr later on?

    Thanks for the help!

    Hi,
    despite the warning that snippet works also with customizr >= 3.2
    It just uses a wp hook, no customizr hooks, so no compatibility problems.

    And yes, you need a child theme for that. Look that you might need it for other things, also for more complicated css rules (which might involve the use of the quotes and double quotes, not allowed anymore in the custom css box [wp themes guidelines]).
    Building a child-theme is simple, and you’ll inherit all your parent customizations. The only thing you have to “do again” is to set (not build, just set again as main theme menu) the menu and put again your widgets in the widget areas. This is because wp stores these settings in a different option of the db.

    Hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Where to put Google Analytics code on home page with sliders’ is closed to new replies.