facebook

Discussion in 'Help' started by creeder, Sep 24, 2007.

Thread Status:
Not open for further replies.
  1. creeder

    creeder New Member

    Joined:
    Sep 24, 2007
    Messages:
    4
    Likes Received:
    0
    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: Sep 25, 2007
  2. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    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.
     
  3. creeder

    creeder New Member

    Joined:
    Sep 24, 2007
    Messages:
    4
    Likes Received:
    0
    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. creeder

    creeder New Member

    Joined:
    Sep 24, 2007
    Messages:
    4
    Likes Received:
    0
    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. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    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.
     
  6. creeder

    creeder New Member

    Joined:
    Sep 24, 2007
    Messages:
    4
    Likes Received:
    0
    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. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    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.
     
  8. Fishyboy

    Fishyboy New Member

    Joined:
    Nov 7, 2007
    Messages:
    1
    Likes Received:
    0
    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. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    Great, thanks.
     
  10. danube

    danube New Member

    Joined:
    Dec 31, 2007
    Messages:
    1
    Likes Received:
    0
    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/index.php/UsageNotes/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.
     
  11. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    Thank you Danube for a great explanation. :)

    Happy New Year to you and yours.
     
  12. koolhand

    koolhand New Member

    Joined:
    Nov 3, 2005
    Messages:
    7
    Likes Received:
    0
    Just checking. I did not see if anyone has gotten StatCounter to work or not. I have use HTML. That did not work! Has anyone found a way around it????? I want a counter like this one on my Facebook acct gerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
     
  13. StatCounterJen

    StatCounterJen StatCounter Team

    Joined:
    Jun 10, 2007
    Messages:
    1,899
    Likes Received:
    0
    To the best of my knowledge, it's against facebook policy to allow any kind of tracker so I don't imagine that anyone will have found a way around installing any kind of counter.

    Complain to facebook. Or move to another social network that allows trackers.
     
  14. pqtespia

    pqtespia New Member

    Joined:
    Jun 18, 2008
    Messages:
    1
    Likes Received:
    0
    .



    Wow. That's very helpful. I was wondering what that strange visit from Facebook I got was.
    Is it possible to block Facebook from accessing the picture?
    Also, I discovered that I have successfully inserted a working tracker using the application "Friends for sale". However, this would only track those who visit your page within the application.
     
  15. Rory_A

    Rory_A Administrator Staff Member

    Joined:
    Apr 30, 2008
    Messages:
    393
    Likes Received:
    0
    This is a quick note to state that Facebook is currently not working with StatCounter.

    Although I was able to add the HTML via a HTML application in my profile only one visit was counted. What occurs is Facebook mangles our code and attempts to cache our img onto their server - this triggers the first hit. However after the initial hit no hits are counted due to their caching system.

    I'm very sorry for the inconvenience, hopefully Facebook will change their system soon so it will work with StatCounter.

    Thank you,

    Rory
     
  16. dmage59663

    dmage59663 New Member

    Joined:
    Jan 21, 2010
    Messages:
    2
    Likes Received:
    0
    idea

    It seems like you need a code that re caches it self each time the page is loaded. but i don't know how to do this.

    good luck
     
  17. dmage59663

    dmage59663 New Member

    Joined:
    Jan 21, 2010
    Messages:
    2
    Likes Received:
    0
    or loads it self back to facebook wach time it is loaded
     
  18. webado

    webado Moderator

    Joined:
    Apr 29, 2004
    Messages:
    28,168
    Likes Received:
    1
    No such thing, sorry.
     
Thread Status:
Not open for further replies.

Share This Page