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

XF 1.4 Where to put google analytics tracking code

#1
Want to add my site to google analytics--

"To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track. "

where would I paste the code?
 
#3
ACP -> Options -> Statics and Metrics -> Google Analytics Web Property ID

Enter just your Analytics ID in the field.
In google analytics there is a tracking code--which is javascript---

and then there is User -ID thing--which is different.

The Google Analytics Web Property ID is for web id or tracking code?
 

Mike

XenForo developer
Staff member
#8
Entering the option doesn't currently use the universal analytics. You can paste that JS code into the google_analytics template if you prefer.
 

Gladius

Well-known member
#12
So, unless I'm missing something, it appears that the old GA code still hasn't been replaced with Universal in XF... why the delay?
 
#13
Do I insert the new script between the

Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}">
script here
Code:
</script><xen:comment><!--Adapted from http://mathiasbynens.be/notes/async-analytics-snippet--></xen:comment></xen:if>
lines?
 

Lone Wolf

Well-known member
#16
"To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track. "

where would I paste the code?
Entering the option doesn't currently use the universal analytics. You can paste that JS code into the google_analytics template if you prefer.
I've been trying to upgrade my Google Analytics account to Universal Analytics. According to the literature I'm supposed to login as Admin and go to the Property field and select the option there. But I cant see any option to upgrade to Universal.
 
#18
You can paste that JS code into the google_analytics template if you prefer.
Ok, i read more carefully and i saw that the code goes to google_analytics template. Do i have to repeat the procedure of replacing code for every style i use at forum?
The path is Appearance > Styles > xxxx(style) > Templates> google_analytics > Edit Template: google_analytics

Do i have to replace all this ...




.... with the Google code?
 
Last edited:

snoopy5

Well-known member
#19
update XF 1.5.12:

The new Google Analytics code is now in the google_analytics template.

Nothing has to be changed anymore in the template itself, since there is now a link within the code to the web property ID, so that it is automatically always the right one.

This web property ID has to be entered in ACP/options/statistics and metrics as shown in another posting above.