OpL Insights

Docs Platform guides

Magento 2

Install the OpL Insights module on Magento 2 and connect your store.

The OpL Insights module adds tracking to your Magento store, sends products, carts, checkout steps and orders, and creates the store's site in OpL Insights when you click Connect. It adds Reports > OpL Insights > Insights and an Insights card to the admin dashboard.

Before you start

  • Magento Open Source or Adobe Commerce 2.4.4 or later, with a Luma-based theme. Hyvä themes are not supported yet.
  • Command-line access to run bin/magento.
  • An OpL Insights account. You create the account key in it.

Install

Download version 1.0.0   Supported versions

mkdir -p app/code/A1l/OplInsights
unzip opl-insights-magento2.zip -d app/code/A1l/OplInsights
bin/magento module:enable A1l_OplInsights
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush

Skip setup:di:compile and setup:static-content:deploy in developer mode.

Connect the store

  1. In OpL Insights, go to Account > API keys and click Create key.
  2. In Magento admin, go to Stores > Configuration > OpL Insights > Connect and settings, paste the key under Account key and click Connect.

The default store view is connected. Fill in Store addresses under Tracking if customers reach the store on more than one address.

Password-protected staging stores: enter the username and password under Site password before you connect. Behind Cloudflare: add a WAF custom rule, URI Query String contains opl_insights/verify, action Skip; see Cloudflare for the full steps.

What is tracked

  • Product, category and search pages, with SKU, price (tax included) and category.
  • The cart each time it changes, and checkout steps: checkout started, shipping chosen, payment chosen.
  • Orders, once each, on the success page, in the base currency.
  • Signed-in customers, sent as private customer data, so full-page cache and Varnish keep working.

Several stores

Agencies looking after many stores can put the connection settings in app/etc/env.php:

'opl_insights' => [
    'enrol' => '<connection code>',
    'url'   => 'https://insights.opl-web.com/',
],