Activity Stream
48,167 MEMBERS
62683 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Exclamation Google Analytics: Multiple accounts with jQuery

    Ok what this tutorial will show you is how to set up 2 google analytics trackers on one site.. this is good if you have sub owners of your sites..


    For litewarez theres me and the other admin where we have our own tracking settings.

    The first thing you need to make sure is that you have jQuery included in your pages!

    And heres is the function

    Code: 
    GATracker = {
    	Start : function(){
    		this.LoadGoogle();
    	},
    	LoadGoogle : function(){
    		var http_ = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.")
    		$.getScript(http_ + "google-analytics.com/ga.js",function(){
    			/*Here the main js source for google is loaded we can start for each account*/
    			var admin_one = _gat._getTracker("UA-XXXXXXXX-X");
    			var admin_two = _gat._getTracker("UA-XXXXXXXX-X");
    			
    			/*Ok so now we have to varaibles that you can do some stuff with...*/
    			/*Both trackers are running now and google should recived data*/
    			
    			/*
    				This is a little nifty trick you can do to percifically
    				track outbound links, katz do this aswell. but you dont have to
    			*/
    			$('a[href^=http]:not("[href*=://' + document.domain + ']")').click(function() {
    				admin_one ._trackPageview('/external/' + $(this).attr("href"));
    				admin_two ._trackPageview('/external/' + $(this).attr("href"));
    			}
    		});
    	}
    }
    
    /*And anywhere in your javascript you can load the tracker like so*/
    
    $(document).ready(function(){GATracker.Start();});
    Now as you can see the above code should be tracking out bound links and working with 2 seperate accounts!




    Hope you enjoy
    litewarez Reviewed by litewarez on . Google Analytics: Multiple accounts with jQuery Ok what this tutorial will show you is how to set up 2 google analytics trackers on one site.. this is good if you have sub owners of your sites.. For litewarez theres me and the other admin where we have our own tracking settings. The first thing you need to make sure is that you have jQuery included in your pages! And heres is the function Rating: 5
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    CodeSociety.net
    why dont u just allow the other admin to view the main account?



  4.     
    #3
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    because

    No1. Your google password is your password fro everything really Youtube,Webmasters,Gmail,

    Not that the other admin is untrusted if they run other sites aswell they dont ahve to go into multiple accounts to view stats
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #4
    Banned
    Good share. This is handy for my project. Thanks a lot.

  6.     
    #5
    Respected Developer
    Website's:
    X4B.org
    Just so you know the loading of google analystics is known to cost up to a second on pageloads, if trying to optimise loading times be carefull.

  7.     
    #6
    Respected Developer
    Website's:
    wrzc.org
    wow SplitIce. That's a lot, didn't know that.

    Anyway why don't you just add the person in Google Analytics? They don't need to know your password etc this way. I don't understand the advantage in two Google Analytics Accounts. Am I missing something?
    See the images below on how to allow another person to view the stats.



    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  8.     
    #7
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com
    Quote Originally Posted by litewarez View Post
    because

    No1. Your google password is your password fro everything really Youtube,Webmasters,Gmail,

    Not that the other admin is untrusted if they run other sites aswell they dont ahve to go into multiple accounts to view stats
    You can add other google accounts to a specific domain, like Sickness and I do with our sites.

    Exactly what Mr Happy said.
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

  9.     
    #8
    Respected Developer
    Website's:
    X4B.org
    Or use piwik it's a great ga alternative

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Google Analytics
    By waito in forum Webmaster Discussion
    Replies: 7
    Last Post: 5th Nov 2011, 08:06 AM
  2. Google Analytics & Google Adsense Help Please
    By Th3Kill33r in forum Technical Help Desk Support
    Replies: 15
    Last Post: 28th Nov 2010, 02:21 PM

Tags for this Thread

BE SOCIAL