Coder Social home page Coder Social logo

Frustrated beginner question about boomerang HOT 3 CLOSED

akamai avatar akamai commented on May 27, 2024
Frustrated beginner question

from boomerang.

Comments (3)

andreas-marschke avatar andreas-marschke commented on May 27, 2024

Hi!

A couple of questions arise from your posting:

  • Which plugins did you add to your boomerang.js build?
  • Did you run it from a server?
  • If you used the RT plugin (see plugins/rt.js) did you open the index.html file from file:// or via your HTTP server?
  • Does your Beacon-Server URL exist and respond to that URL? ("http://xxx.xxx.xxx.xxx/boomerang/images/beacon.gif")

The problem is that it is required to at least have the rt.js plugin activated as some parts of the boomerang.js parts require it to funciton properly.

I ran this here once from a file:// url with nothing sent to the beacon-server and once undera simple expressjs server (see below):

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">
  <script type="text/javascript" src="boomerang-0.9.0.js"></script>
  <script type="text/javascript">
    BOOMR.init({
        beacon_url: "//localhost:4001/beacon/0000/index/start",
        RT: {
            cookie: "cookie-rt",
            strict_referrer: false
        }
    });

    BOOMR.subscribe("before_beacon",function() {
        console.log(arguments);
    });
  </script>
</head>
<body>

</body>
</html>

This worked as exprected. Heres the output from my Beacon-Server (bunyan format):

{
  "name": "boomerang-express",
  "immediate": false,
  "hostname": "kemp",
  "pid": 5411,
  "req_id": "f76909d1-13ba-4904-9c5b-70f3302aaf34",
  "level": 30,
  "remote-address": "127.0.0.1",
  "ip": "127.0.0.1",
  "method": "GET",
  "url": "/beacon/0000/index/start?rt.start=navigation&rt.tstart=1413046039510&rt.bstart=1413046039809&rt.end=1413046039874&t_resp=12&t_page=352&t_done=364&t_other=t_domloaded%7C310&r=&v=0.9&u=http%3A%2F%2Flocalhost%3A4000%2F",
  "referer": "http://localhost:4000/",
  "user-agent": {
    "browser": "Chrome",
    "version": "37.0.2062",
    "device": "Other",
    "os": "Linux"
  },
  "body": null,
  "short-body": "{}",
  "http-version": "1.1",
  "response-time": 0,
  "status-code": 0,
  "req-headers": null,
  "res-headers": {
    "x-powered-by": "Express",
    "content-type": "image/png"
  },
  "req": {
    "method": "GET",
    "url": "/beacon/0000/index/start?rt.start=navigation&rt.tstart=1413046039510&rt.bstart=1413046039809&rt.end=1413046039874&t_resp=12&t_page=352&t_done=364&t_other=t_domloaded%7C310&r=&v=0.9&u=http%3A%2F%2Flocalhost%3A4000%2F",
    "headers": {
      "host": "localhost:4001",
      "connection": "keep-alive",
      "cache-control": "max-age=0",
      "accept": "image/webp,*/*;q=0.8",
      "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36",
      "dnt": "1",
      "referer": "http://localhost:4000/",
      "accept-encoding": "gzip,deflate,sdch",
      "accept-language": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
    }
  },
  "res": null,
  "incoming": "<--",
  "msg": "127.0.0.1 <-- GET /beacon/0000/index/start?rt.start=navigation&rt.tstart=1413046039510&rt.bstart=1413046039809&rt.end=1413046039874&t_resp=12&t_page=352&t_done=364&t_other=t_domloaded%7C310&r=&v=0.9&u=http%3A%2F%2Flocalhost%3A4000%2F HTTP/1.1 0 - http://localhost:4000/ Chrome 37.0 Linux 0.0.0 0 ms",
  "time": "2014-10-11T16:47:19.902Z",
  "v": 0
}

from boomerang.

bluesmoon avatar bluesmoon commented on May 27, 2024

Right, as @andreas-marschke says, you need to have at least one plugin included for beacons to fire. boomerang was written this way so that plugins could be added later without worrying about the beacon having fired already.

from boomerang.

nicjansma avatar nicjansma commented on May 27, 2024

Since this issue has been answered, and we haven't received any additional feedback, closing for now.

from boomerang.

Related Issues (20)

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.