Phygrid Developers
Browse Topics
Web Signals / Phygrid Developers

Web Signals

This page describes how you can integrate your existing or new websites to Grid Signals.

Step 1: Install Web Signals

Go to the Grid Console, and navigate to the Marketplace page. Install the Web Signals app.

Marketplace Web Signals

Step 2: Configure your app

Copy the script from the console Settings to your index.html

Settings

Example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <title>React App</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <script async src="https://app.omborigrid.com/web-signals/signal.js"></script>
    <script>
      window.gridDataLayer = window.gridDataLayer || [];
      function gridSignal(){gridDataLayer.push(arguments);}
      gridSignal('init', 'tenantId', 'XXXXXX');
      gridSignal('init', 'installationId', 'XXXXXX');
      gridSignal('init', 'spaceId', 'XXXXXX');
      gridSignal('init', 'dataResidency', 'EU');
      gridSignal('init', 'country', 'SE');
    </script>
    <div id="root"></div>
  </body>
</html>

Step 3: Send events

On page load, the Web Signals will be initialized.

To send events, use gridSignal('<function-name>', <args>) function in your app.

See Event Tracking page for the list of available functions.

...
  gridSignal('sendCartAdd', {
    productId: 'XXXXXX',
    quantity: 1
  });
...

Step 4: Real-time dashboards

Real-time dashboards are available in the Grid Console

© 2024 · Phygrid. An Ombori company