Installing Beacon Tracker

Adding Beacon Events

Testing Beacons

Verify Beacons Sent

Verify Beacons Health

Sending Beacons

Sending Beacons Through Tracker Functions

Tracker is a piece of code that you need to embed in every page of your web application. These functions capture your shopper’s action and store it in a beacon which is then sent to GroupBy. Once the tracker client is installed, instantiated, and has its Visitor and Session IDs set (e.g. with autoSetVisitor), you can start sending beacons.

Implement beacons using these instructions if the following describes your relationship with GroupBy:

  • You have begun to use GroupBy Search on your site, and
  • You have signed some form of contract with GroupBy for our services

Following types of events you can send with the GbTracker tracker:

Event Type Description
Auto Search When a shopper views search results from GroupBy Search.
View Product When a shopper views a product from the product details page.
Add to Cart When a shopper adds products or services to their cart. Only the items added to the cart must be included, not the entire cart.
Remove from Cart When a shopper removes at least one product or service from their cart. Only the items removed from the cart must be included, not the entire cart.
Order When a shopper checks out items from their cart.

autoSearch

gbTracker.sendAutoSearchEvent()

This beacon should be sent when a shopper views search results from GroupBy Search. The contents of the search results do not need to be included in this function call. GroupBy servers will automatically forward the search results internally.

sendAutoSearchEvent Parameter
object
search
object

Search properties for the Auto Search beacon.

required
experiements
array[object]

viewProduct

gbTracker.sendViewProductEvent()

This beacon should be sent when a shopper views a product. This can be loading a web page dedicated to a product or when a new HTML element is inserted into the DOM (or displayed in a modal), showing the shopper product details.

sendViewProductEvent Parameter
object
product
object

Details of the product viewed.

experiments
array[object]

addToCart

gbTracker.sendAddToCartEvent()

This beacon should be sent when a shopper adds an item to their cart. This must only include the items that were added to the cart as a result of the shopper’s interaction with the page (e.g. by clicking on an “add to cart” button), not the entire cart.

sendAddToCartEvent Parameter
object
cart
object

The cart containing the items added to the shopper’s cart, not the entire cart, during the shopper’s interaction with the page.

required
experiments
array[object]

removeFromCart

This beacon should be sent when a shopper removes an item from their cart. It must only include the items that were removed from the cart as a result of the shopper’s interaction with the page, not the entire cart.

sendRemoveFromCartEvent Parameter
object
cart
object

The cart containing the items removed from the shopper’s cart, not the entire cart, during the shopper’s interaction with the page.

required
experiments
array[object]

order

gbTracker.sendOrderEvent()

This beacon should be sent when the shopper places an order.

sendOrderEvent Parameter
object
cart
object

The cart containing the items present in the shopper’s cart when they viewed it during the shopper’s interaction with the page.

required
experiments
array[object]