Optimads/Info
Enter the app

Magento.

The Optimads module puts the script on every page, checkout included, and reports orders the moment they come in. A read-only integration brings in the real orders.

≈ 10 min Updated Oct. 15, 2026
What you need
  • Magento 2.4 (Open Source) or Adobe Commerce, with administrator access.
  • For the module: someone who can run bin/magento commands on the server (usually the store's developer).
  • The Meta pixel chosen in Optimads, under Connections. TikTok is optional.

1. The integration, for orders

  1. Add the integration

    In the Magento admin: System → Extensions → Integrations → Add New Integration. Name: Optimads. Under Your Password, enter your administrator password.

  2. Tick only what we need

    In the API tab, under Resource Access, choose Custom and tick:

    Sales → Operations → Orders → Actions → View

    and Stores → Settings → All Stores (currency and time zone). For product costs in your profit figures, also Catalog → Inventory → Products. Leave the rest unticked.

  3. Activate

    Save & Activate, then Allow. Magento shows you 4 codes: Consumer Key, Consumer Secret, Access Token and Access Token Secret.

  4. Connect in Optimads

    Click “Connect Magento” and fill in the store address and the 4 codes. If Magento runs in a folder, add the folder too, for example yoursite.com/shop.

Orders come in on their own, every few minutes. With the integration we only read them; we don't change anything in the store.

2. The Optimads module

  1. Download the module

    In Tracking → Setup → Store installation, Magento tab, click “Download the module”. It comes already configured for your account.

  2. Put it in Magento

    Unzip the file into the store's main folder: app/code/Optimads/Tracking appears.

  3. Run the commands

    On the server, in the store's folder:

    bin/magento module:enable Optimads_Tracking

    bin/magento setup:upgrade

    bin/magento cache:flush

    If the store is in production mode, also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy -f in between. The exact commands, ready to copy, are also in the Magento tab.

The module puts the script on every page, checkout included, sends the exact order value on the thank-you page and reports orders right away. Its settings are in Stores → Configuration → Optimads → Tracking.

Why the module. Since Magento 2.4.7, the checkout page blocks any script from another domain that isn't on the store's trusted list. The module adds us to that list. Without it, the checkout step isn't tracked.

3. Turn off the old pixels

Disable the Meta extension (Meta Business Extension or Facebook Business Extension) and the TikTok pixel from other extensions. They send the same sales with different codes, and Meta and TikTok would count them twice. If the Meta extension also runs your catalog, turn off only the pixel and Conversions API.

In Meta Events Manager, also turn off Tracking without code. Details: Old pixels and duplicates.

Without the module

You can put the script in Content → Design → Configuration → your store → HTML Head → Scripts and Style Sheets. You'll find it in the Magento tab, under “Without the module: the script in HTML Head”. Without the module, the checkout step isn't tracked, and we send the order value from the server, from the store. If you install the module later, the script in HTML Head can stay: it won't load twice.

Common problems

“Magento refused the request signature”

One of the two secret codes (Consumer Secret, Access Token Secret) wasn't copied in full. Copy them again from System → Extensions → Integrations → Optimads.

“Magento doesn't give access to orders”

On the integration, in the API tab, tick Sales → Operations → Orders → Actions → View, save and click Reauthorize.

“The integration can't read the store settings”

Tick Stores → Settings → All Stores on the integration and reconnect: that's how we read the exact currency and time zone.

“Magento has stopped giving us the orders”

Check that the Optimads integration is still active in System → Extensions → Integrations.

Stuck?Send us your website address and the step you're on. We'll help you.
contact@optimads.ai