Magento is an ecommerce platform which provides online retailers with a shopping cart system and other functionality for your online store.
Once set up, Magento data is ingested hourly by Ometria by default.
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.
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.
Under Advanced, review the option to Trigger Ometria Page View on variant selection:
This field defaults to Yes, which means that if a customer visiting your website clicks a product (e.g. a green t-shirt), then clicks on a variant of that product (e.g. the same t-shirt in blue, or a different size), it will count as two separate page views in Ometria.
Change this field to No if you don't want to count product variants in your page views.
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.
Upgrading from Magento 1 to Magento 2
If you are already using Magento 1 and want to upgrade to Magento 2, please contact your Customer Success Manager, who can guide you through the process.
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: 220.127.116.11
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: