<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Google Analytics code (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Google Analytics code
#24
torfig (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Google Analytics code 3 Years, 10 Months ago Karma: 0  
Hi all,
Is it easy to add a google analytics code and quantcast code to php links?

Torfi
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#25
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Google Analytics code 3 Years, 10 Months ago Karma: 9  
Sure thing. Probably the best place to add the little javascript snippet they provide is at the bottom of /themes/X/footer.php where X is the name of the theme you use

Code:

$html .= "</td></tr></table>"; echo footertable("100%","center",$html); unset($html); ?> <-- google analytics snippet could go here ->
Since these are typically javascript, which is processed by the viewers computer, you'll want them as near the bottom of the web page as possible, otherwise they'll make the script and your website appear slow
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/04/08 07:02 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#27
torfig (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Google Analytics code 3 Years, 10 Months ago Karma: 0  
Excellent.
Thanks a lot Dewed.
Torfi
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1201
Kosiii (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
gregykos a-bet.info abetinfo
Re:Google Analytics code 2 Years, 1 Month ago Karma: 0  
Hello there.

I tried to add the javascript from analytics where u suggest but hten I get this message in front end which is part of the added code:

Code:

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"));
Any idea where else I can add the analytics code? Thanks.
 
Report to moderator   Logged Logged  
 
links.a-bet.info ... we share it all!
  The administrator has disabled public write access.
#1203
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Google Analytics code 2 Years, 1 Month ago Karma: 9  
Makes sure you have added the javascript outside of the PHP. Add it immediately after the closing PHP tag

?>
javascript
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008