FlyPosting

Search engine marketing and optimisation notes designed to help get the most from your web site traffic building.

Wednesday, 6 August 2008

All I'm seeing is the default page!

This is a follow up to Show me some ID in which I wrote about how to get the full path to show up in your latest page views report when your site content is dynamically generated.



What I didn't cover was a quirk relating to a site's index page. In FlySoup this defaults to, well... 'default', regardless of any query string.

So what happens if your dynamic content is based off a page called index.php. All you see is 'default page'. Not particularly useful.

Here's the work around.

As before, you will need to make a small adjustment to the tracking script.

In the tracking script, change
wa_pageName=location.pathname; // you can customize the page name here

to read
wa_pageName=' '+location.pathname+location.search;

In the changed line, you can leave just a space between the two single quotes, or you can make it 'your site name' or 'Page ' or something similar. Whatever you put will precede the page name and query string.

Labels: ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< FlyPosting Home





Wednesday, 23 July 2008

Show me some id

Dynamically generated web pages will have a url containing a query string that might look something like this:


www.test.com/somedirectory/some.php?id=41&pageno=1


Taking the example shown above, the default set-up for the FlySoup tracking code will show some.php as the page visited in your stats report.

What most subscribers with dynamic/content managed sites will want to know is the specific id and page number in order that a more granular interpretation of the stats is possible.

location.search will do this for you.

To get the full query string make the following change in the tracking script:

look for and change wa_pageName=location.pathname; // you can customize the page name here

to read wa_pageName=location.pathname+location.search;

In an ideal world, your web designers would also use URL rewriting to provide a more intuitive URL so that as well as the script returning the full query string it does so in plain English rather than id=41&pageno=1.

Labels: , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< FlyPosting Home





Find out more

To find out more about FlySoup or for an informal conversation about your web site, please call David Hughes on: +44 (0)20 7096 7290

Hard copy correspondence should be sent to:
87 Charterhoue Street,
London
EC1M 6HJ

Powered by Blogger

Subscribe to
Posts [Atom]