Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
aeroskyn
Hangin' Around



Joined: Mar 08, 2011
Posts: 37
Location: 29.8N 81.9W

PostPosted: Sat Aug 20, 2011 7:52 pm Reply with quote

I know this is an old topic, but I couldn't get any results from the old results. The most recent one I saw had to deal with connecting with webmaster tools. I have tried that but still get the yellow triangle with the exclamation point inside.
That being said, has anyone figured a way to insert the anal-ytics code into RN somehow? I have not seen where adding the html code was an option, as it once was.
Any help? Thanks in advance.

_________________
Life is hard. Concrete is hard. Life is concrete. 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sat Aug 20, 2011 10:17 pm Reply with quote

kguske wrote:
Here is a file that includes examples of how to create addons that require CSS and / or JS at the following levels:

- site HEAD section: nukeINFO(tm) (admin PHP info function)
- site BODY section: nukeSTATS(tm) featuring Google Analytics
- module HEAD section: nukeGAMES(tm) featuring jQuery Sudoku by Chip Camden

The only change required is to rnconfig.php if you want to use Google Analytics. This could be added as a database configuration if we move in the direction of a more flexible configuration file. But for purposes of demonstrating RN's dynamic CSS / JS load process for addons, this should suffice. It even includes samples of how to develop addons that work with RN's dynamic CSS / JS load and with other Nuke flavors that don't support that.

After vetting this, if there are no major issues, I'll update the wiki to refer to this, too.
 
View user's profile Send private message Visit poster's website
aeroskyn







PostPosted: Sun Aug 21, 2011 12:48 am Reply with quote

Thanks for responding, spas. According to your 'here' link, all it told me to do in the config.php, was add this:

define('GA_TRACKER_UA','UA-********-*');

I took those instructions literally. I replaced the asterisks with my acct no. I didn't get a confirmation of the code being present. I tried adding the full code after the semi-colon, on the next line, with no results.

I know I must be doing something incorrectly. Maybe the part inside of the parenthesis should be my entire code as provided by google? If so are the parenthesis included? Or some sort of combination that I need further explanation from you? I added this right above the close body tag.

OK...I am rereading the 'here' file...I may get this...stand by.


Last edited by aeroskyn on Sun Aug 21, 2011 1:34 am; edited 1 time in total 
spasticdonkey







PostPosted: Sun Aug 21, 2011 1:15 am Reply with quote

make sure you have uploaded includes/addons/body-nukeSTATS.php to your site.

as far as Analytics I've never used it.. so I don't know the formatting of acct numbers... but for entering your acct no, X marks the spot, and you were right to add on a new line.

define('GA_TRACKER_UA','X');

also note the Analytics code will not load if you are in the admin area.
 
aeroskyn







PostPosted: Sun Aug 21, 2011 1:29 am Reply with quote

Hmmm...now you have me humming, while moving my index finger up and down, rapidly, between my lips.'Confused'

I have not uploaded includes/addons/body-nukeSTATS.php to my site. Probably is my problem or part of. Where can I find that, please? If that is in the 'here' link, it refers to an html file to put in my root folder. I'm not sure what it is talking about here. GA has not given me an html code to put in a folder?? Their code is java script.

"also note the Analytics code will not load if you are in the admin area."

I am not on my site or in admin on my site, but I am in the server, in root file....again, confused. Or are you referring to the admin section of the google analytics?

Thanks for the patience and help.
 
spasticdonkey







PostPosted: Sun Aug 21, 2011 3:33 am Reply with quote

In the archive mentioned above, upload this file
RNdynaJS/html/includes/addons/body-nukeSTATS.php

to your server
ROOT/includes/addons/

provided you have done the other edit properly, it should start working.

By admin area I meant the ravennuke admin area. kguske's script above intentionally does not load analytics code while you are in administration; as google cannot reach those pages to track them....

you dont need the javascript code from analytics, just your acct number as described above, and nukeSTATS will post the code for you... once you get it working Wink
 
aeroskyn







PostPosted: Sun Aug 21, 2011 6:40 pm Reply with quote

First off...still not working. This is what I have done:

I uploaded "body-nukeSTATS.php" and only that file, to my root/includes/addons. I didn't change anything in that file, except to add my google analytics number, in place of *****-*. I say 'only that', because it seems the instructions are telling me to upload the whole html file that is part of RNdynaJS, to the root file.(?) More confusion, perhaps.

I added the line to config.php, again, only change was to include my google id number, in the line I was supposed to add... [define('GA_TRACKER_UA','X'); ].

I added that above info, just above the closing body tag, even though, google analytics is telling me to add the whole code in the head, just above the close head tag. Are we sure of this? Body vs. head? Doesn't really seem to matter, as I've tried both places.

Secondly, is there a possibility that google has changed/modified their code to some degree, that it doesn't like the old code created/ written by kguske, in the "body-nukeSTATS.php ". I ask because it just looks different from what google is providing to me. But I am a noob in this area, to be sure.
 
spasticdonkey







PostPosted: Sun Aug 21, 2011 6:53 pm Reply with quote

if you can pm or post the code they gave you I'll take a look. it's possible there have been changes
 
aeroskyn







PostPosted: Mon Aug 22, 2011 6:21 pm Reply with quote

For those following this thread, the code has changed. Spasticdonkey pm'd the remedy that fixed the problem. His message was:

Quote:
ok looks like the code has changed. remove any files/changes you have made.
[ Only registered users can see links on this board! Get registered or login! ]

edit the file head-nukeSTATS.php

insert your acct number between the quotes (as it appears in the script they gave you):
$GA_Tracker = 'UA-********-*';

upload to:
/includes/addons/

it should hopefully work Smile

if not go your home page and view source and see if the code is present in the head of the document (before </head>)

if it is and it's not working verify it has the correct acct # in the code.


My additional note:
The code that needed to be added in the config.php [define('GA_TRACKER_UA','X');], needs to be put just above the closing head tag, not the closing body tag.

Thanks spastic donkey for all your help. You and the rest of the guys and gals here are super!

edit: It didn't take 24 hours for the change to take effect, but it did take at least 6 hours, in my case, for the triangle with the exclamation point to turn into a check mark. So be patient....
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©