Google Analytics

At work we are having a discussion about Google Analytics referencing information by page titles and URL changes (where the node id turns into the permalink we specify).
If you add a minor correction to the title of a Drupal page, GA will treat it as a new page and start the counter all over again.
If the person in charge of doing the reports is not aware of the title changes, it will mess up her reports.

Is it possible to track GA information by Drupal node id's? Most systems will track by ID by default, but maybe there are some configurations that need to be completed in GA or Drupal before you can do that?

We are considering implementing a procedure where titles and URLs are finalized even before the page is published, but this seems like really poor practice in my opinion because clients will still come back with title changes, or will ask to re-use the same page year after year with new content on it. There must be some other solution!

Any help you provide would be greatly appreciated.

Drupal blocks, beans, etc.

I need to create "hub pages" (pages with multiple blocks to different areas of a Drupal site) but I have limited access to what I can modify.

Right now the pages that are supposed to be "hub pages" are just simple content pages with a series of divs and inline CSS as blocks, which IMO is a really bad way of coding pages when we can use Drupal to its full potential. And we're also wasting a lot of time tweaking the inline CSS which is being overwritten by the Drupal css...

I think what we should be doing for browser compatibility is to use the "Drupal Blocks" area of the site to create blocks that can easily be added to multiple pages but I don't fully understand how Drupal blocks work.

I'm not really sure what I should be doing and with limited access to most of the block types (the only blocks I can create are "beans"), I need to understand this more before I can get the access I need from the other team who installed the site.

There are several other types of blocks already created so I added some HTML content to it, but I don't know how to add that block to a bean page or if it should be added to a content page?

Please help.


Wordpress migration from dev to production


I downloaded the Wordpress source files to my development environment, where I am playing around with new features and adding content.
Now that I have a better comfort level with Wordpress, I'd like to migrate my blog content to my production server through FTP.

I understand I also would have to migrate the database too, since that's where all my content is stored.

Should I go through the installation process on my production server, and then copy the modified databases over to production? Or should I just paste all of my PHP source files from dev into a new folder on my server and assume that things will work (I guess that is kind of a silly question?)

Is there anything I should be aware of when pasting the files in Production and logging into it? My biggest concern is while I am going through the installation again, someone else could be trying to go through the Wordpress files as I am configuring my blog environment for the first time.

I can't change the database names on my server, since it is going through a web hosting company, so perhaps it is better to go through the installation again in production, and then migrate the content from the databases.

Your help is greatly appreciated!

kelsie patchingson

SQL injection .NET

The pentesters told use that the following code is vulnerable to SQL injection in our e-store:

create procedure dbo.uspBeAfraidBeVeryAfraid ( @p1 varchar(64) )
declare @sql varchar(512)
set @sql = 'select * from ' + @p1

How I should fix the issue?

Event on closing browser window

I am working on a web site (ASP.NET, FW4) which has a secure section (login required).
I would like to clear the session variables when customer closes the browser.
To achieve that I have placed a hidden button on the MasterPage (have tested, it works) and then trying to call the ASP method using JavaScript.
    <script type="text/javascript">
      window.onbeforeunload = function()
      function CustomLogoff()
         var button1 = document.getElementById('<%=hiddenLogoutButton.ClientID %>');;
    <asp:Button runat="server" ID="hiddenLogoutButton" 
         Text="Invisible Logout Button" Visible="false" 
         onclick="hiddenLogoutButton_Click" />

(Also tried to put this call into body tag: <body onbeforeunload='CustomLogoff()'>)

CustomLogoff is not being called. Thought when calling it like this:

<input type="buton" onClick="CustomLogoff()" value="logoff">

It works fine (on button click of course).

Is there a way to make it work on browser closing too?

web content accessibility and web forms

I have to validate pages for web content accessibility standards, and I have to explain to the client why in certain cases having a radio button is more acceptable than a checkbox; but I can't seem to find anything to back this up.

The website form uses labels, and is created by the client with some of the following options:

Gender: Female: [] Male: []

Languages spoken: English: [] French: [] Both: []

The page does not validate server-side because the idea is you're supposed to fill out the form and click the "Print" button at the bottom, then send. Why they didn't create a fillable form in Adobe is beyond me, but that is the not the point right now...

I do not think there is anything in the WCAG standards about using checkboxes or radio buttons but it seems this is often overlooked by web publishers. But if someone helps me find some good information to bring forward to the client, then that should be enough evidence to change the form.

I tried doing a google search but I don't think I am choosing the search words, or please help me out


Catch undefined method calls in JS


There is an interesting task. I need to catch any undefined calls in my JS code. Is there a solution?

    function a() {
        alert('Hi, I'm a function!');

    a(); // works great

    a.b(); // call undefined function

So, are there any ways to catch calls a.b() in my function a()?

ARGH, any way I can find a anti spam guestbook?

Ok, if you didn't know, HTML Gear is closing. I'd used them for guestbooks on my personal pages for a long time.

However they're closing, so I took them off. The service I switched to said they were anti spam but..

First entry I get is spam. It's proly time to start hosting the guestbook on my own server since I can. Mind, I have access to recapatcha which seems to stop most spammers. Is there any scripts out there that'd allow that?
  • Current Mood
    aggravated aggravated