StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 09-24-2007, 10:04 PM
creeder creeder is offline
Junior Member
 
Join Date: Sep 2007
Posts: 4
Default I may have found a way to make this work with facebook

So I've found an app on facebook that lets you input raw html code and have it display what you want on your profile. I've put in the code for an stat counter image so I can get page view numbers. And the image will actually display on my profile. The problem is that it isn't counting a hit number when I load my profile page. But it is actually counting a hit when I load the edit portion of the facebook app, where the logo also appears, not showing the html code behind it unless you press a button. I thought perhaps the problem was that the ip adress was wrong in that I had set it for the app page instead of the profile. I've changed it to the profile page though and it still counts the hit only from the edit page on the app. The app's name is My Box. Can anyone help me? Is there any chance of getting this to work?

Last edited by creeder; 09-25-2007 at 12:00 AM.
  #2  
Old 09-25-2007, 01:19 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 27,708
Default

I don't think you can use it there. At least not with javascript.
The image itself may work, unless Facebook removes it as other applicaiotns do too such as Myspace.

In any case you need to view the source code of the page where you expect it to show up. We cannot get there to see, it's in your Facebook account.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #3  
Old 09-25-2007, 02:49 AM
creeder creeder is offline
Junior Member
 
Join Date: Sep 2007
Posts: 4
Default

I used the html only code. Does there still need to be java script ability for that some how? Like I said when I view it in the application page it registers a hit. So it does work from inside facebook. It just doesn't register on my profile page.
  #4  
Old 09-25-2007, 03:04 AM
creeder creeder is offline
Junior Member
 
Join Date: Sep 2007
Posts: 4
Default

This is the code I put up:

<a href="http://www.statcounter.com/" target="_blank"><img src="http://c33.statcounter.com/2981807/0/c1b3aa0c/0/" alt="free web hit counter" border="0"></a>
  #5  
Old 09-25-2007, 03:26 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 27,708
Default

Ok it will register a hit on whatever page where it shows up in the source code.

But withtou javascript you will never know in your stats what page it was.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #6  
Old 09-27-2007, 09:52 PM
creeder creeder is offline
Junior Member
 
Join Date: Sep 2007
Posts: 4
Default

What do you mean by showing up wherever the source code is. Is this why its not registering hits on my profile page but is on the preview page for the app. I know which page its registering becuase it only records a hit when I'm on my preview page which only I can access.
  #7  
Old 09-28-2007, 02:34 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 27,708
Default

If when you visit your profile page as regular users would and you check the source code of that page you don't see the Statcounter code there, then it's simply not showing up where it has to show up so it won't register any hits wither because there's no code.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #8  
Old 11-07-2007, 08:19 PM
Fishyboy Fishyboy is offline
Junior Member
 
Join Date: Nov 2007
Posts: 1
Smile

I've managed to get it to work. Go to the Applications section and add an application that allows HTML. I use "My Box" as it is small and unobtrusive.

When it is installed, go to the edit section of the application and add your counter code. You can't use Javascript anywhere on Facebook, so use the html only code. Make sure you add it into the html section of the editor for your application and not the text part, or the code will be visible and won't work.

I've had mine up and running for a little while and it seems fine.
  #9  
Old 11-07-2007, 08:26 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 27,708
Default

Great, thanks.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #10  
Old 12-31-2007, 07:02 AM
danube danube is offline
Junior Member
 
Join Date: Dec 2007
Location: Blacksburg, VA
Posts: 1
Default Answered (but not solved)

Hopefully this helps explains things...
So I decided to fiddle around with getting facebook to play nice with statcounter tonight. With all the new fancy facebook apps with dynamic content, I was sure I would be able to find something that would let me embed statcounter code. I didn't have my hopes up for javascript, I doubted that facebook would let that run. A search for ready made apps that let you embed html turned up roughly twenty different applications. I tried My Box, HTML Profile Box, and My HTML; all with the same results. I also tried using the myspace div workaround. I'd get an initial hit from my IP in Virginia to statcounter, and a single hit from the Facebook servers in Wisconsin. Subsequent reloads of my profile didn't generate new hits on statcounter.
I figured some sort of caching was going on. Guess what, facebook has documentation! (I just stumbled on it tonight). I don't think you need a facebook account to read this, here's the link:http://wiki.developers.facebook.com/...geNotes/Images
The general gist is that facebook caches images for 1) QC 2) Privacy 3) Removal of hosting burden from devs. I can see where using Statcounter might *interfere* with privacy issues. So it makes the initial request from the facebook servers, and serves that up when anybody else hits the counter. You see hits when you edit the html because I guess that tell facebook to recache the info. On a side note, one of the apps (My Box I think) reformated the html to FBML (facebook markup language).

Well its 3am and I'm not proofreading this, and I couldn't get statcounter on my facebook, but at least I know why so that's enough for now. Maybe I'll get creative tomorrow. Thinking..."You can request your image be recached by using the following query. facebook.fbml.refreshImgSrc('imgURL')"...that might do it.

For the curious I've been using statcounter since 2005 and think its a great service, but this is the first time I've ventured to the forums.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.