Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Adding html to php pages
This discussion has been closed.
Comments
I had expected to physically add code to pages, and had no idea an extension/add-on was so easy (if you know how). I'll give it a try, and try to understand fully later.
just checked out the above add-on at my own forum and it works OK for me.
you might want to go into your analytics settings (on google.com, not in that extension) and change it a little:
under Profile Settings->Main Website Profile Information, edit the Exclude URL Query Parameters field so that it says "page, PostBackAction" - just so you don't get a lot of different kinds of hits for what is really a request for the same page.
for example a request for this:
http://lussumo.com/community/comments.php?DiscussionID=3507&page=1
is really the same as a request for this:
http://lussumo.com/community/comments.php?DiscussionID=3507
and this:
http://lussumo.com/community/comments.php?DiscussionID=3507&PostBackAction=whatever
but you really only care about hits on that thread, not on each of the individual pages or when people save settings. so all you want is the "DiscussionID" part of the url - you want google analytics to ignore the "page" and "postbackaction" parts.
sorry if this is not clear, i didn't explain very well.
dinoboff, i credited you as the author in the source. i know you're thrilled.
I have just (finally) upgraded to 1.01 (from 0.9.2.6) tonight. I chose the add-ons I wanted, including Google Analytics and uploaded about a dozen to my site. But I had 2 problems .....
(1) Vanilla didn't list Google Analytics in the Extensions list under settings. I'm assuming this was because it wasn't in the form of /Extension name/default.php. I put it in a folder as required - should I just change the name of the file to default.php?
(2) There didn't seem to be a save button on the Extensions page in Settings, but that is a separate problem.
there is no save button because it's all done through ajax. the save happens invisibly when you click a checkbox.
Fatal error: Call to a member function on a non-object in /home/console/public_html/engineersvoice/extensions/GoogleAnalytics/default.php on line 17
Line 17 looks like pointing to this line in the default.php
$Head->AddScript("http://www.google-analytics.com/urchin.js");
Any solutions to this problem?
ercatli: glad you got it sorted out. you are in the wrong section of google analytics. make sure you're in Profile Settings->[Main] Website Profile Information, and you're looking for the field called "Exclude URL Query Parameters" exactly.
Any comments?
are you sure about this? how do you know? if it's true, i'll move it to the end of the page.
Had the same experience with 2 of my sites.
For example, if i use this addon, sometimes only the header will be loaded while analytics is still collecting visitor's data. As for sidepanel addon, you may only see the header and the panel. Placing the code at the end (footer) at least loads up the full page b4 analytics collects data.
Yeah,I'm sure of this Cheers!
"It [the urchin script] should be immediately before the </body> tag of your page"
i'll change the addon.
I'm afraid I'm still having a bunch of problems with Google Analytics. I am getting inconsistent recording of visits when I test, and it is difficult to isolate whether it is because of a fault in GA or at my end. Could you help me please by explaining a little more what the "page" and "PostBackAction" achieve? My understanding is that:
(1) If a thread goes over onto a second page, the two pages have the same ID number, but a page number is added to the title, so we exclude the "page" from what is recorded, so GA sees them both as the same - is that right? But won't it still record it as two hits, just the same page visited twice??
(2) I don't understand "PostBackAction" at all, but I think it has something to do with Vanilla responding to some input, and I guess you're wanting to lump the input and the resonse together. But again, won't that still give 2 "hits", just on the same page?
I'll do some more testing today, and get back to you again if I may if I have any more questions (hope that's OK?). I originally only wanted simple statistics, and thought GA would be easier than Slimstat or Shortstat or Statcounter or whatever, but now I'm enmeshed in it, I want to try to get it right before I give up. Thanks.
i just don't like having a really long list of page hits like this in my stats:
http://myforum.com/discussions.php?DiscussionID=4
http://myforum.com/discussions.php?DiscussionID=4&Page=2
http://myforum.com/discussions.php?DiscussionID=4&Page=3&PostBackAction=Save
http://myforum.com/discussions.php?DiscussionID=4&Page=4
http://myforum.com/discussions.php?DiscussionID=4&Page=5&PostBackAction=Save
etc...
and repeat for each discussion, when they're all really just hits to the same thread. i only care about the hits per discussion, not per discussion and also per page and also per PostBackAction. you might need more granularity than i do.