• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Multiple Google Analytics Codes?

CTXMedia

Formerly CyclingTribe
#3
Use one code in your XF board options then add filters (within GA) for the pages/sections you want to analyse; unless you're trying to achieve something directly related to different skins?
 

taylor_smith

Well-known member
#4
Already have a property code for the domain, but also have a separate property for forums. Want to have a property for both, but add a profile for forums to the primary domain property.
 

CTXMedia

Formerly CyclingTribe
#5
Okay, go to Admin and select the primary domain property.

Click the New Profile button.

Name your profile, e.g.; forums

The new profile should now be selected so click the Profile Settings tab and add "/forums" to the Website's URL field and click Apply at the bottom.

Is that what you're after?

Cheers,
Shaun :D
 

taylor_smith

Well-known member
#6
Heh, I mean actually placing the second code into our forums. I've got the profile added, but the property code for it hasn't been added.
 

CTXMedia

Formerly CyclingTribe
#7
Okay, I'm a bit confused - you've two Property ID's? One for the main site (domain) and one for the forums (which you add to XF via Home > Options > Statistics and Metrics) - why the need for the separate forums profile on the main property ID?

In this scenario there also shouldn't be any need to modify templates - you just put the forums propery ID into XF.

Apologies if I've misunderstood what you're trying to achieve.

Cheers,
Shaun :D
 

taylor_smith

Well-known member
#9
Okay, I'm a bit confused - you've two Property ID's? One for the main site (domain) and one for the forums (which you add to XF via Home > Options > Statistics and Metrics) - why the need for the separate forums profile on the main property ID?

In this scenario there also shouldn't be any need to modify templates - you just put the forums propery ID into XF.

Apologies if I've misunderstood what you're trying to achieve.

Cheers,
Shaun :D
Because the original forum property ID has 7 years of data that will be lost if I junk it and start a new one.

I know how to add a property id, assign a profile and filters. :) I'd like to add a second code, though, to track my network as a while with one, but maintain the existing years of data with the other.

I've done this with multiple WordPress sites. You add the this way:

Code:
_gaq.push(['b._setAccount', 'UA-3196911-27']);
_gaq.push(['b._trackPageview']);
 
_gaq.push(['c._setAccount', 'UA-3196911-40']);
_gaq.push(['c._trackPageview']);
Just looking for a way to do it in XenForo without adding it to every individual theme.
 

DBA

Well-known member
#10
Because the original forum property ID has 7 years of data that will be lost if I junk it and start a new one.
Why would you have to junk it and start a new one?
I've done this with multiple WordPress sites. You add the this way:

Code:
_gaq.push(['b._setAccount', 'UA-3196911-27']);
_gaq.push(['b._trackPageview']);
 
_gaq.push(['c._setAccount', 'UA-3196911-40']);
_gaq.push(['c._trackPageview']);
Just looking for a way to do it in XenForo without adding it to every individual theme.
Interesting, did not know that you could have multiple ID's/accounts on the same page.

While not recommended, you could add it to the Master Style, just make sure to back it up before upgrading XF in the future (as it'll be overwritten).