Where to add custom code when changing pages

  • Posted in : Empathy
  • luisnomad
    Participant

    Hi,

    I have seen that Google Analytics doesn’t work with this theme. It only tracks the domain, but visiting different pages from the menu doesn’t reflect on GA so I can’t see which pages have been visited.

    I know how to set the needed variables myself, but if you could point where are the click handlers, that would make my life easier. I am guessing I will need to add the code on top of yours, in a separate file, so I can keep it after updating the theme.

    Could you please give me some clues?

    Cheers,

    Luis

    serkan
    Moderator

    Hi Luis,
    I would recommend you to create a child theme and do all customization on it.
    https://codex.wordpress.org/Child_Themes
    Thanks

    luisnomad
    Participant

    I have added Google Analytics page tracking and video background here:
    https://github.com/luisnomad/empathy-child-theme

    Feel free to use the code if you want :)

    serkan
    Moderator

    Hi,
    Thank you for your help and feedback.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register