Git Product home page Git Product logo

bgif's Introduction

#######  #     #     #     #######   ###    #####   
   #     #     #    # #       #      ###   #     #  
   #     #     #   #   #      #       #    #        
   #     #######  #     #     #      #      #####   
   #     #     #  #######     #                  #  
   #     #     #  #     #     #            #     #  
   #     #     #  #     #     #             #####   

            #######  #     #  #######  
            #     #  ##    #  #        
            #     #  # #   #  #        
            #     #  #  #  #  #####    
            #     #  #   # #  #        
            #     #  #    ##  #        
            #######  #     #  #######  

      ######    #####   ###  #######   ###   
      #     #  #     #   #   #         ###   
      #     #  #         #   #         ###   
      ######   #  ####   #   #####      #    
      #     #  #     #   #   #               
      #     #  #     #   #   #         ###   
      ######    #####   ###  #         ###   

overview

Inspired by the spacer.gif, bgif is a little bitty javascript library for logging from the browser to http access logs, asyncronously and fast. Based on the original work from www.geobacon.com

example

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
    <div id="container">
        <a href="#" id="buynow">Buy Now!</a>
    </div>
    <script src="bgif.js"></script>
    <script>
    var bgif = new BGIF('http://featureblend.com/static/beacon.gif');
    document.getElementById('buynow').addEventListener('mouseover', function(){
        bgif.log({
            type: 'mouseover',
            target: 'a',
            goal: 'buynow'
        });
    }, false);
    </script>
</body>
</html>

access.log

$ tail -f /var/log/access.log
XXX.XXX.XXX.XXX - - [26/May/2011:14:56:29 -0500] "GET /static/img/beacon.gif?v=32547type=mouseover&target=a&goal=buynow&_cb=1306439789042 HTTP/1.1" 200 356 "http://geobacon.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" "-"

bgif's People

Contributors

docyes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

clarkbox

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.