Results 1 to 5 of 5

Thread: Different Google Analytics tracking code per root page, or per template?

  1. #1
    User
    Join Date
    06-19-09.
    Posts
    106

    Default Different Google Analytics tracking code per root page, or per template?

    How could I have a different Google Analytics tracking code per root page, or per template?

    I know that I could just add the tracking code to each template myself, but I would like to preserve the current functionality where backend users are not counted when logged in.

    How can this be done? Many thanks

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    You can simply create multiple analytics_google Templates and you can set the name to anything you like, as long as it begins with analytics_

    You can also create subfolders in the template folder for each theme you use and define that folder in the theme and then create additional analytics_* templates there.

  3. #3
    User
    Join Date
    06-19-09.
    Posts
    106

    Default

    Thank you for your reply. I've now got two questions:

    • Does this not work within the same theme somehow? It's just that I've set up everything within the same theme (all files for the three sub-sites that I want to track separately)

    • If I make different template folders, how to I link a particular folder to a particular theme?

    Many thanks

  4. #4
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by spirelli View Post
    • Does this not work within the same theme somehow? It's just that I've set up everything within the same theme (all files for the three sub-sites that I want to track separately)
    Yes, as I already said, you can create multiple analytics_google templates and rename them to analytics_google_lorem, analytics_google_ipsum, etc. You will be able to select them individually in your layout.


    Quote Originally Posted by spirelli View Post
    • If I make different template folders, how to I link a particular folder to a particular theme?
    In the theme's settings.

  5. #5
    User
    Join Date
    06-19-09.
    Posts
    106

    Default

    Alright, all clear. Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •