tips and tricks for movable type

LGF referrers script
October 04, 2002

I added the LGF referrers script to track only referrers to the Tips blog.

For some reason, I can't get AXS to track any referrals to my site since I switched to PHP and had to use the Javascript method of calling the script instead of SSI.

So I just decided to try something new since I now have PHP capabilities!

Now if I can just figure out why the Bloglet RSS feed doesn't seem to be working. =(

Update 10.07.02: Note to self: if you expect AXS Javascript to work properly, make sure you use proper path to CGI script. Arrrghhh!!

Comments

To get referrers AXS needs to be called via an include of it will not have access to server variables such as the referrer. In PHP you can call it with the virtual() function eg: virtual("cgi/ax.pl"); which will work just the same as the SSI include.

I use it that way on my site, and get referrers just fine.

Also, the information you've compiled for MT is wonderful. I've used your site quite a bit this past week as I have been switching from Blogger. Thanks.

by tom | 10.08.02 12:45 AM

Thanks Tom - unfortunately, not only am I so dopey that I had my path wrong, but I also posted an edited entry to that effect - I just posted on the wrong entry! (See "update" to THIS entry, hehe. You can also use JS with AXS, btw.)

When I get some time and energy again, I'll go back through and change the Javascript to PHP, I'd rather use that!

And I'm very happy to hear that you were helped in some way by my efforts here. =)

by girlie | 10.08.02 05:25 PM

I don't understand why referrers don't work on my site.

I have tried both Textism's and LGF's, but they just won't list any referrers.

For textism, the test page and everything was OK, but no referrers were shown.

For LGF, the page was simply blank.
http://www.manic.com.sg/blog/show-refs.php

by Karen | 10.18.03 09:38 PM

Karen, are you including the call to the script in your other pages? None of them have a .php extension, so I wasn't sure.

by girlie | 10.18.03 10:03 PM

I only included it in the index. I have now changed the page extensions to .php.

Could the problem be because my blog is in the directory /blog/, but the domain name defined in lgf-reflog.php is manic.com.sg?

by Karen | 10.19.03 07:01 AM

Hi girlie,
Just wanna tell you that I finally got the LGF referral script to work! On the index page at least.

I didn't know that the server prefers index.html to index.php. So even though I changed the output file for the index template to php and all the file extensions to php, the server was still throwing up the index.html file which I did not delete.

Do you put the script on all your templates or just the index one? Does it work on non-index pages as well?

Thanks for all your help.

by Karen | 11.06.03 08:45 AM

Um, I've switched to the Textism refer script instead. I works even for the non-index pages which is what I'm looking for. But now I think I need to tell my server to render php code in html pages because google has my pages all as .html pages.

by Karen | 11.06.03 07:46 PM

I use the LGF script in all my pages, not just the indexes.

by girlie | 11.06.03 07:51 PM

Hmmm, the lgf one wouldn't work on the non-index pages. But never mind, I'm happy with the Textism one.

Another problem though. Now I need all the pages to have a .php extension for the referer script to work, but google has got my pages down as .html ones. As a result I am not able to track any visitors coming from google at all.

Any ideas on how to work around this? Just hoping there might be something I can do rather than modify the htaccess file, which I can't do.

by Karen | 11.07.03 06:38 AM

Hmmm, the lgf one wouldn't work on the non-index pages. But never mind, I'm happy with the Textism one.

Another problem though. Now I need all the pages to have a .php extension for the referer script to work, but google has got my pages down as .html ones. As a result I am not able to track any visitors coming from google at all.

Any ideas on how to work around this? Just hoping there might be something I can do rather than modify the htaccess file, which I can't do.

by Karen | 11.07.03 06:45 AM

I just wanna say that it only took two days for google to re-crawl my site, updating their records from .html to .php. So to anyone else facing the same dilemma as me, I say, "Just do it."

by Karen | 11.10.03 09:06 PM

When going from HTML to PHP I changed the links on my old pages to have the new PHP names internally (but still be HTML externally). Then I added all the new pages all point internally and via PHP extensions so that they were all okay. Now Google and others with find my new pages with all links referring the the PHP pages and index them and the new pages. You can duplicated the index.html and archives.html to point to all the new php pages so when those pages get hit, they have new stuff (the old is probably static anyways,

I'll leave the old html for a while so that old links for other servers (and track-backs?) point to pages that don't crash. I'll remove them eventually and have the error message mention that they might want to just try changing the extension (or try it for them).

I've got a .htacces file to redirect them but I really don't know if everything does that properly, Better for overkill than to lose already made connections. Eventually I'll change the old HTML to just a short text file that redirects.

by Gary LaPointe | 06.01.04 02:42 AM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 2
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/98)

» Faithjean dot com's photolog is up!
Excerpt: Thanks to Gabriel for helping me:-) 2 do list: *The comment on this page doesn't work right now! Hopefully I'll figure it out soon...:-) Scripts: *Add: Most commented - entries & Most commented - visitors script *Last 50 referrers(pop up)...
Weblog: .::faithjean.com::.
Tracked: 01.06.04 05:30 PM

» Where'd YOU come from?
Excerpt: I'm talkin' 'bout referrers, baby. I sorted out the lgf referrer script I found via girlie matters and got it to work. You can see my referrers here. There's just one right now; this blog doesn't get a whole lot...
Weblog: [supafine] geek blog
Tracked: 03.17.04 09:29 PM