Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-31 21:24:55

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

How to see what companies are viewing your site.

update: currently offline

I developed this for a corporate client, and thought others might find it useful. It is a drop-in file that uses TXP logging and a few lookups to give you some interesting visitor data:

  • Shows names & addresses of companies who are viewing your site (with a link to google for the company name)
  • Displays search terms used to find your site (Google, Hotbot, AOL, MSN, Techrepublic)
  • Can differentiate between referrers that are “organic” google results and those that are google adword clicks
  • Uses Textpattern’s authentication (need a txp account on the site to view)

To install, download the zip Just copy the file into your textpattern directory. No configuration necessary.

Nothing super-sneaky here; the script just does an ARIN whois lookup on the visitor’s IP address. Visitors browsing from work will show up as their company, or as their company’s ISP. Visitors browsing from home will almost always show up as their ISP (eg Road Runner), their home address will not show up (unless they personally own the IP block they happen to be using – not likely).

I see this as being mainly useful for companies that want to see what other companies are viewing their site, e.g. from a marketing standpoint, competition, etc.

Obviously you have to have logging turned on in your prefs otherwise it will not display any data. However, it doesn’t matter whether your logs are using the DNS option or not.

Note: if you try to access the script and are not logged into textpattern, you will have to login first, and then manually type the url of the script (eg yoursite.com/textpattern/txpwhois.php). Sorry, this drop-in script isn’t sufficiently integrated with txp for it to take you there right from the login page :)

Last edited by jdueck (2006-09-05 16:04:43)

Offline

#2 2006-01-31 22:02:41

6sigma
Member
From: Memphis, TN, USA
Registered: 2004-05-24
Posts: 184
Website

Re: How to see what companies are viewing your site.

Were I thirty-five years younger, this would be sick. As is, it is slick! Thank you.

  • * * UPDATE * * Once I’ve logged into Txp and navigated to my “logs” page, I type the URL: yoursite.com/textpattern/txpwhois.php and that takes me to page 1 of the “whois log.”

At the bottom of that first screen is a “next” button. That button is trying to take me to this URL: yoursite.com/textpattern/whois2.php?page=2. Only after I change it to yoursite.com/textpattern/txpwhois.php?page=2 does it actually take me to the second page of the “whois log.” I must make a similar change to page through the rest of the whois log pages.

It’s fine, but I thought you’d want to know.

Last edited by 6sigma (2006-02-01 05:04:35)


“Well, I, uh, don’t think it’s quite fair to condemn a whole program because of a single slip-up, sir.” General ‘Buck’ Turgidson

Offline

#3 2006-02-02 17:00:31

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: How to see what companies are viewing your site.

Thanks, I’ve fixed the typo. whois2 was the filename for an old version.

I’ve also added support for google image searches – they show up with the search words (linking to the actual search) and a thumbnail of the image viewed in the search.

Offline

#4 2006-02-02 17:08:34

tal
New Member
Registered: 2005-04-15
Posts: 6

Re: How to see what companies are viewing your site.

Could you provide a screen shot?

Thanks.

Offline

#5 2006-02-02 18:40:18

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: How to see what companies are viewing your site.

This is a partial screenshot showing the google image search support. I can’t post a full screenshot for obvious reasons.

As you can see, an ARIN whois lookup on a non-us/canada host will usually return RIPE or Latin American and Caribbean IP address Regional Registry or something similar. If you manually lookup the IP address at http://www.arin.net/whois/, it will direct you to the correct foreign equivalent where you can do another lookup and get the actual name and address of the organization. But that’s only if you’re really curious.

Offline

#6 2006-03-23 13:58:05

bluelena69
Member
From: North Carolina
Registered: 2006-01-06
Posts: 51

Re: How to see what companies are viewing your site.

I am getting a “no input file” error when I attempt to look at page 2.

fixed, sorry…I tried to rename the file without editing other info too.

Cheers,
Blue

Last edited by bluelena69 (2006-03-23 14:00:27)


“He has emotional problems. We need a new American President…”

—Hugo Chavez

Offline

#7 2006-08-03 16:05:36

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How to see what companies are viewing your site.

Hi Joel, thanks for a very useful tool. I am wondering if you can help with an error I keep getting (which slows down the browser a great deal):

Warning: fsockopen(): unable to connect to rwhois.arin.net:4321 in /usr/www/users/foo/textpattern/txpwhois.php on line 22

Offline

#8 2006-08-03 16:58:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to see what companies are viewing your site.

Can you log in on your webserver using SSH or telnet and enter this command: whois 207.7.108.185
If that also gives errors about not being able to connect, then perhaps you’re blocked from using Arin’s rwhois service.

Offline

#9 2006-08-03 17:06:07

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How to see what companies are viewing your site.

Hi ruud, thanks for the tip. I tried it and it seems to work fine. I get this information:

<pre><code> whois 207.7.108.185 NEXTLEVEL INTERNET, INC. NEXTLVL-ARIN-002 (NET-207-7-96-0-1) 207.7.96.0 – 207.7.127.255 TextDrive, Inc. NEXTLVL-046-TEXTDRV-1 (NET-207-7-108-0-1) 207.7.108.0 – 207.7.108.255 # ARIN WHOIS database, last updated 2006-08-02 19:10 # Enter ? for additional hints on searching ARIN’s WHOIS database.</code></pre>

Is there anything else I should check out?

Offline

#10 2006-08-03 18:31:56

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to see what companies are viewing your site.

When using this plugin, do you still see information in the ‘Arin whois’ column?
If so, then the plugin can at least connect some of the time. If not all log entries show whois info, then those are probably the ones where the connect failed.

Offline

#11 2006-08-03 18:53:32

MsContrary
Member
From: California
Registered: 2004-12-27
Posts: 52
Website

Re: How to see what companies are viewing your site.

This is great fun! Thanks Joel.

It’s working with all my sites hosted on Textdrive, plus one hosted elsewhere.


I am not a professional woman

Offline

#12 2006-08-03 19:22:36

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How to see what companies are viewing your site.

ruud wrote:

When using this plugin, do you still see information in the ‘Arin whois’ column?

Usually when I get the error, there’s one blank entry in that column, while others display normally, so it looks like your guess is correct that some connections fail.

I just discovered that if I reload a page with an error, the error goes away. Guess it’s just a sporadic Internet hiccup, thanks for helping me troubleshoot.

Offline

Board footer

Powered by FluxBB