Check today's New Posts or your PMs

Welcome Guest ( Log In | Register )

Tags
Google Analytics     Google     analytics    
 Digg this topic · Save to del.icio.us · Slashdot It · Post to Technorati · Post to Furl · Submit to Reddit · Share on Facebook · Fark It · Googlize This Post · Add to ma.gnolia · Tag to Wink · Add to MyWeb · Add to Netscape
Reply to this topicStart new topic
How do I add Google Analytics to other skins?
Rating 5 V
 
admin
post Mar 11 2007, 06:55 AM
Post #1


Administrator
***

Group: Root Admin
Posts: 5,130
Joined: 25-January 07
Member No.: 1



By default, like most features in CommunitySEO, Google Analytics works under the Spider skin but no other skin sets you have installed.

To add Google Analytics to your other skins, login to your Admin CP, visit the Look & Feel tab, click the button next to your skin, and click "Edit HTML Templates". Click on All Global HTML, and then click on global_board_header.

Add the following to the very beginning of this skin template bit

CODE
<if="$this->ipsclass->vars['seo_google_urchin']">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("{$this->ipsclass->vars['seo_google_urchin']}");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</if>


Click on "Save Template Bit" and repeat for each skin you have installed.
Go to the top of the page
 
+Quote Post
Brad
post Jun 21 2007, 10:54 AM
Post #2


Advanced Member
***

Group: Customers
Posts: 77
Joined: 30-May 07
Member No.: 216



Is this the adsense business? I have adsense on my site, but just the normal code I was provided with by Google. If I change it to this, how different is it?
Go to the top of the page
 
+Quote Post
admin
post Jun 23 2007, 03:26 AM
Post #3


Administrator
***

Group: Root Admin
Posts: 5,130
Joined: 25-January 07
Member No.: 1



No, this is analytics. It's a javascript-based metrics program from Google basically. smile.gif

google.com/analytics
Go to the top of the page
 
+Quote Post
jlmartin
post Oct 2 2007, 09:09 AM
Post #4


Advanced Member
***

Group: Customers
Posts: 44
Joined: 11-September 07
Member No.: 464



QUOTE(admin @ Jun 23 2007, 08:36 AM) *
No, this is analytics. It's a javascript-based metrics program from Google basically. smile.gif

google.com/analytics


Does the setting on the ACP take care of this on the lastest version, or are the edits still necessary?
Go to the top of the page
 
+Quote Post
admin
post Oct 2 2007, 08:11 PM
Post #5


Administrator
***

Group: Root Admin
Posts: 5,130
Joined: 25-January 07
Member No.: 1



It's still the same - we didn't want to add instructions for dozens and dozens of skin edits to the main installation, many of which users may not want or need. As a result, we've separated out all the skin edits to FAQ entries in this forum.

If you want the Google analytics feature on the skins your users use, you will need to add it using the above instructions.
Go to the top of the page
 
+Quote Post
twistedgamer
post Jan 16 2008, 10:56 PM
Post #6


Advanced Member
***

Group: Customers
Posts: 309
Joined: 9-November 07
From: Middle of the Desert state
Member No.: 574



I believe Google has updated the Analytics code. This is the code they gave me and said it needs to be placed right before the </body> tag.

The XXXXXXX is your account ID.

CODE
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
Go to the top of the page
 
+Quote Post
smallblockfuelie
post Mar 21 2008, 11:24 AM
Post #7


Advanced Member
***

Group: Customers
Posts: 143
Joined: 10-September 07
From: CA
Member No.: 459



Twisted, yes you're correct. That is the newer format.
Go to the top of the page
 
+Quote Post
SKiZZ
post Apr 14 2008, 07:19 PM
Post #8


Advanced Member
***

Group: Customers
Posts: 209
Joined: 23-March 07
From: Birmingham, AL
Member No.: 57



Can this skin edit be updated for the new google analytics code?
Go to the top of the page
 
+Quote Post
Tommy
post Apr 19 2008, 02:51 AM
Post #9


Advanced Member
***

Group: Customers
Posts: 264
Joined: 29-August 07
Member No.: 424



QUOTE (SKiZZ @ Apr 15 2008, 01:19 AM) *
Can this skin edit be updated for the new google analytics code?


If needed, I#d like to see an update too. Cheers
Go to the top of the page
 
+Quote Post
twistedgamer
post Apr 20 2008, 11:07 PM
Post #10


Advanced Member
***

Group: Customers
Posts: 309
Joined: 9-November 07
From: Middle of the Desert state
Member No.: 574



Just edit the spider skin and any skins you added the code to after install with the new code. Make sure to use your account number as I don't think the settings in ACP will edit new code yet.
Go to the top of the page
 
+Quote Post
jobesmind
post Apr 25 2008, 10:31 AM
Post #11


Newbie
*

Group: Customers
Posts: 4
Joined: 10-October 07
Member No.: 518



Just so it is posted here;

Replace old script in header template

CODE
<if="$this->ipsclass->vars['seo_google_urchin']">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "{$this->ipsclass->vars['seo_google_urchin']}";
urchinTracker();
</script>
</if>


With the new Tracker

CODE
<if="$this->ipsclass->vars['seo_google_urchin']">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "<A href="https://ssl">https://ssl</A>." : "<A href="http://www">http://www</A>.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("{$this->ipsclass->vars['seo_google_urchin']}");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</if>


Acct will still update via AC
Go to the top of the page
 
+Quote Post
SKiZZ
post Apr 26 2008, 11:21 PM
Post #12


Advanced Member
***

Group: Customers
Posts: 209
Joined: 23-March 07
From: Birmingham, AL
Member No.: 57



<if="$this->ipsclass->vars['seo_google_urchin']">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("{$this->ipsclass->vars['seo_google_urchin']}");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</if>

This looks like it works. I'll know in a day if google is collecting data.
Go to the top of the page
 
+Quote Post
SKiZZ
post May 17 2008, 11:44 AM
Post #13


Advanced Member
***

Group: Customers
Posts: 209
Joined: 23-March 07
From: Birmingham, AL
Member No.: 57



QUOTE (SKiZZ @ Apr 27 2008, 05:21 AM) *
<if="$this->ipsclass->vars['seo_google_urchin']">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("{$this->ipsclass->vars['seo_google_urchin']}");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</if>

This looks like it works. I'll know in a day if google is collecting data.


Hmm, google analytics isnt working. Wonder if I am banned?
Go to the top of the page
 
+Quote Post
mmmecn
post May 31 2008, 11:26 PM
Post #14


Advanced Member
***

Group: Customers
Posts: 30
Joined: 26-December 07
From: India
Member No.: 683



So can any one tell me which code is exactly is working now ??
Go to the top of the page
 
+Quote Post
admin
post Oct 19 2008, 07:08 PM
Post #15


Administrator
***

Group: Root Admin
Posts: 5,130
Joined: 25-January 07
Member No.: 1



First post updated
Go to the top of the page
 
+Quote Post
Tommy
post Oct 24 2008, 12:23 PM
Post #16


Advanced Member
***

Group: Customers
Posts: 264
Joined: 29-August 07
Member No.: 424



Thanks admin!
Go to the top of the page
 
+Quote Post
johnthompson
post Nov 2 2008, 09:19 AM
Post #17


Newbie
*

Group: Members
Posts: 2
Joined: 1-November 08
Member No.: 1,496



I didn't want to put it using the Static News/Announcements method because it was meant for something else and someday I may want to use that feature. Also method #1 put the code snippet at the top of the page before the post entries whereas Google's suggestion is to put it at the bottom of the page before the </body> tag. Method #2 was a good option but if I want to change my skin to refresh my site's look and feel I'd have to do the same thing on each skin that is loaded for my site. I ended up choosing method #3 because it placed the code a lot closer to where Google wants and if I want to change my sites skin I don't have to edit the skin's master page.


--------------------
You are making progress if each mistake is a new one.
aoc gold review
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Collapse

> Links to this thread

Page Date Hits
analytics in IPB - Google Search 3rd June 2007 - 09:24 PM 1
ipb where to add google analytics - Google Search 4th June 2007 - 10:04 PM 1
ipb analytics - Google Search 7th June 2007 - 06:09 AM 1
ipb google analytics - Cerca con Google 10th June 2007 - 11:07 AM 1
IPB forum google analytics - çéôåù á-Google 20th June 2007 - 11:12 AM 1
IPB google analytics - Google Search 22nd June 2007 - 09:24 PM 1
google analytics en IPB - Buscar con Google 22nd June 2007 - 10:08 PM 1
ipb google analytics - Google'da Ara 24th June 2007 - 10:12 AM 1
google analytics ipb - Google Search 27th June 2007 - 09:26 AM 1
google analytics ipb - Cerca con Google 27th June 2007 - 04:56 PM 1
ipb google analytics - Google Search 1st July 2007 - 10:45 PM 1
Google Analytics ipb - Google Search 3rd July 2007 - 10:27 AM 6
google analytics invision board - Google Search 4th July 2007 - 09:00 AM 1
google analytics 22 june - Google Search 6th July 2007 - 03:10 AM 1
google analytics in invision forums - Google Search 6th July 2007 - 09:23 AM 1
meebo.com 6th July 2007 - 09:28 AM 1
google analytics ipb - Google Search 10th July 2007 - 03:42 AM 1
add ipb forum to google - Google Search 10th July 2007 - 03:20 PM 1
ipb google analytics - Google Search 11th July 2007 - 07:13 AM 1
google analytics skin - Google keresés 16th July 2007 - 03:59 AM 1


RSS Lo-Fi Version Time is now: 5th January 2009 - 08:54 PM