Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge boomerange and custom object and then fire beacon #265

Closed
pankajmahesh opened this issue Jul 3, 2019 · 6 comments
Closed

Merge boomerange and custom object and then fire beacon #265

pankajmahesh opened this issue Jul 3, 2019 · 6 comments

Comments

@pankajmahesh
Copy link

hi,

Is there a way to intercept beacon fire from boomerang script and then fire single beacon with extra object merged?

thanks

@bluesmoon
Copy link
Member

You need to write a boomerang plugin that adds data to the beacon. You might also be able to do this by subscribing to onbeforebeacon and adding it there.

@pankajmahesh
Copy link
Author

pankajmahesh commented Jul 3, 2019 via email

@ashenoy2014
Copy link

@pankajmahesh Rather than overriding send beacon, it will be better to follow @bluesmoon advice and create a separate plugin that listens for onbeforebeacon event and adds the additional custom data that you need on the beacon via BOOMR.addVar. This should ensure only sending a single request with your additional data in the beacon.

@pankajmahesh
Copy link
Author

@ashenoy2014 @bluesmoon

Let me describe the issue,

  1. We want to add boomr object inside our object as key
  2. We are overriding certain boomr object keys as per our DB schema
  3. Currently there are multiple boomr hits on page with different set of data. How do i make it single and then fire beacon with our custom obj.

@nicjansma
Copy link

@pankajmahesh Boomerang may fire several beacons, depending on how your site is configured. If you want to share a page with Boomerang on it, we can take a look. Typically, Boomerang will send at least two beacons:

  • Page Load
  • Unload

Of course if you've configured XHR or SPA or Error monitoring, those can all send additional beacons as well. The parameters on the beacon can help you differentiate what type of beacon it is. Look for the rt.start and http.initiator and rt.quit parameters. All of the parameters are described in the docs, e.g. for the RT plugin.

As the others have suggested, creating a plugin that listens for beforebeacon will give you the ability to BOOMR.addVar() before the beacon is sent. addVar() will either set or overwrite existing data, so you can use that as an interception point.

@pankajmahesh
Copy link
Author

pankajmahesh commented Jul 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants