Magento is an ecommerce platform which provides online retailers with a shopping cart system and other functionality for your online store.
This article explains how to add the Ometria extension to your Magento 2 ecommerce platform, allowing you to automatically import your contacts, products and orders.
Note: Ometria also supports integration with Magento 1.
There are two stages to setting up a Magento 2 connection:
- Installing the open source Ometria Magento 2 extension
- Configuring and testing the extension.
Your technical product manager will provide you with a link to the setup wizard which guides you through these steps:
Installing the Magento 2 extension
The Ometria Magento 2 extension enhances Magento 2’s in-built API to support easier and faster data exchange to Ometria.
The extension is open source and available from github: https://github.com/Ometria/magento2-extension.
Follow the setup instructions in the github repository to install the module.
Once you’ve completed the installation, return to the wizard and click Check configuration:
Make a note of the Ometria API Private Key and Ometria Site Identifier for later steps.
Configuring the Magento 2 extension
Once you’ve installed the Ometria extension, you can begin configuring it.
In Magento, go to: Stores > Configuration:
Select Ometria from the left-hand menu and click Analytics Settings:
Enter the following details using the information from the setup screen.
Ometria Site Identifier
Enter the Ometria Site Identifier from the setup wizard.
Ometria API Private Key
Enter the Ometria API Private Key from the setup wizard.
Click Save Config to finalise.
Now you can return to the setup wizard and click Check configuration against both steps:
When both steps show ‘Correctly configured’ your installation is complete.
If either step fails to configure, see Troubleshooting guidance below.
Troubleshooting your Magento 2 setup
Step 1 fails to validate after installing and enabling the extension
Please check that the API public key has been set correctly (and that you have not accidentally mixed up private and public keys) and that your site is receiving active traffic.
If you are using a test site that doesn’t have active visitors, try navigating to the site to register some visits.
Step 2 fails to validate
Check that the API public and private key has been set correctly (and that you haven’t accidentally mixed up private and public keys).
Also check that the API endpoint URL is correctly set against the Magento 2 root URL and is valid. You can change this if needed and revalidate.
Finally, check that your web server doesn’t have any IP based rate limiting or HTTP based authentication if it’s a test or staging site.
Allowing the Ometria importer IP address
If your website has a firewall that’s blocking access based on IP address, please unblock/allow the Ometria source IP address.
Allowing access to a site using HTTP Basic Authentication
Sometimes, test and staging sites use HTTP basic authentication so that you need a login to access the site.
E.g. a window appears when visiting the site:
In this case, you need to add the login username and password in the the API endpoint URL as follows: