Verify Event Collection

Magento Commerce only

The content on this page is for Magento Commerce only. Learn more

After you install and configure the magento/product-recommendations module, you can verify that the behavioral data is being sent to Magento. Magento uses the DataServices.js file to collect and send behavioral data. You can use developer tools available in Chrome, or you can install the Snowplow Chrome extension.

Verify using developer tools in Chrome

To ensure that the DataServices.js file is loading on all site pages:

  1. In Chrome, choose Customize and control Google Chrome then select More Tools > Developer Tools.
  2. Choose the Network tab then select the JS type.
  3. Filter for ds.
  4. Reload the page.
  5. You should see ds.js or ds.min.js in the Name column.

    Filter DataServices

To ensure events are firing on pages across your site (home, product, checkout, and so on):

  1. In Chrome, choose Customize and control Google Chrome (the three vertical dots in the upper right corner of the browser) then select More Tools > Developer Tools.
  2. Choose the Network tab then select the XHR type.
  3. Filter for tp2.
  4. Reload the page.
  5. You should see calls under tp2 in the Name column.

    Filter tp2

Verify using Snowplow Chrome extension

Install the Snowplow Analytics Debugger extension for Chrome. This extension displays the events being collected and sent to Magento.

  1. Make sure you disable any ad blockers on your browser.

  2. In Chrome, choose Customize and control Google Chrome (the three vertical dots in the upper right corner of the browser) then select More Tools > Developer Tools.

  3. Choose the Snowplow Analytics Debugger tab.

  4. Under the Event column, select Structured Event.

  5. Scroll down until you see Context Data n. Look for the storefront instance in the Schema.

  6. Verify that the SaaS Environment ID is set correctly.

    Snowplow filter

If you run into any problems verifying that the events are collected and sent to Magento, contact support.

Verify events are firing correctly

To verify that the events used for metrics are firing correctly, look for the impression-render, view, and rec-click events in the Snowplow Analytics Debugger. See the full list of events.

Events for metrics

If Cookie Restriction Mode is enabled, Magento does not collect behavioral data until the shopper consents. If Cookie Restriction Mode is disabled, Magento collects behavioral data by default.