If your eCommerce is developed in Magento, you can easily integrate it with Connectif and start collecting data from your customers to create your campaigns.
In this article, you will learn how to install and configure the Connectif module for Magento 2.
Difficulty: Advanced (requires technical knowledge).
When to use it?: When opening your Connectif account.
STEP 1. Download and Installation of the Magento 2 Module
Depending on the version of Magento your eCommerce has, you should follow different steps:
- If you have a version prior to Magento 2.2, check section A of this step.
- If you have a version after Magento 2.2, check section B of this step.
- If you have Magento + Hyvä, check the section corresponding to your version and point 6 of the frequently asked questions.
A. Versions prior to Magento 2.2
A.1. Download the module
1. Log in to your Connectif account.
2. Go to Store Settings in the left-hand menu.
3. In the E-commerce Platforms section, find Magento and click Edit.
4. In the Configuration section, click on Download Magento 2 Module to download the “connectif.zip” file to your computer.
A.2. Copy the Connectif folder to the Magento installation
5. Copy the folder "Connectif" and all its contents inside the folder "/app/code/", located at the root of the Magento 2 installation.
A.3. Module installation
6. Access the Magento 2 admin panel and go to the "System > Web Setup Wizard" section.
7. In Module Manager, search for the Connectif_Integration module and select Activate.
8. Follow the steps indicated by the Connectif module installation and click Next:
Readiness Check: in this step, checks related to PHP version, crons, dependencies, and extensions are performed.
Backup: in this step, a backup of the eCommerce is made prior to the module installation.
Enable module: in this step, the module activation is performed.
B. Versions after Magento 2.2
B.1. Download the module
1. Log in to your Connectif account.
2. Go to Store Settings in the left-hand menu.
3. In the E-commerce Platforms section, find Magento and click Edit.
12. In the Configuration section, click on Download Magento 2 Module to download the “connectif.zip” file to your computer.
B.2. Copy the Connectif folder to the Magento installation
13. Log in to the Magento 2.x store via SSH connection.
14. After a successful SSH login, using the command line (shell), go to the root directory where Magento 2 is installed.
15. Upload the module (as a Zip or tar.gz) to the Magento 2 installation root directory.
16. Unzip the file into a temporary directory.
17. The location to copy the unzipped module must be “app/code/Connectif/”. Create that folder with the following command:
mkdir –p app/code/Connectif/18. Copy the contents of the unzipped folder into the folder created in the previous step:
cp -R Connectif/* app/code/Connectif/19. Run the Magento 2 installation command from the root:
php bin/magento setup:upgrade20. Compile the installed module with:
php bin/magento setup:upgrade21. Clear the cache with:
php bin/magento cache:flus
STEP 2. Module Activation
22. Go to "Stores > Configuration > " and locate the Connectif configuration.
23. In Basic Configuration, select the option Yes in the Activate field, so you can complete the Client ID and Secret Key options.
24. Go to your Connectif account and, in the "Integrations > Magento" section, copy the Client ID and the Secret Key.
25. Return to Magento 2 and paste them into the corresponding fields.
26. Click "Save Config" to save the changes.
Frequently Asked Questions
Do you have questions about the Connectif module in Magento? Here you will find useful information:
1. What is each section of the Connectif module in Magento for?
The Connectif module in Magento consists of different sections, each serving different functions:
- Basic Configuration (1): this section is used to configure the basic aspects of your Connectif account in Magento, documented in this article, and to start your strategy.
- Banners (2): this section is deprecated, since banner format content is configured directly from Connectif.
- Customer (3): this section allows linking custom contact fields in Connectif with those in Magento. To do this, select one of the contact fields available in the CMS (left selector, Customer Field) and associate it with the ID of the field created in Connectif (right selector, Connectif Field ID).
- Product (4): this section allows linking custom product fields in Connectif with native fields in Magento. To do this, click on the Select Attribute selector of the field you want to associate (Custom Field 1, 2, or 3) and select the product attribute for that field.
- Public Urls (5): this section is used to consult the activation URLs of the ServiceWorker and the notification subscription URLs.
These URLs are generated and communicated to Connectif when the module is installed in Magento.
-
Advanced Configuration (5): this section is used to establish certain behaviors of the integration with Connectif:
- Print only mandatory fields on cart tags?: this option determines whether the Connectif script will collect only the mandatory cart fields (product ID, name, price, and URL). This option helps improve the performance of the cart tag in Magento.
- Use product variants on cart and purchases?: this option determines if, when Connectif receives the cart product information, it collects the default product or the specific variant.
- Product image Id: this option determines the image size that Connectif will collect.
- Notify purchases offline: this option determines if the eCommerce will notify Connectif of offline purchases via API and without web context.
- Order Status: this option determines the status that purchases must have to be registered via API (offline notifications) in Connectif.
- Create newsletter subscribers if customer does not exist?: this option allows selecting whether to create the contact in Magento as a newsletter subscriber if they do not exist in Magento when registering or unsubscribing from Connectif.
- Show product view with proper currency when Connectif verifies the product: this option affects the case where product synchronization is done via web scraping. It allows indicating whether, when Connectif's mechanism visits the website to synchronize/verify a product, it does so in the same currency configured in Connectif.
2. How to activate offline purchase notification (via API)?
1. In your Magento account, go to "Stores > Configuration", click on Connectif, and then on Settings.
2. Deactivate the Connectif module from the "Basic Configuration > Activate" section by selecting the No option.
3. Click Save Config.
4. Go to the "Advanced Configuration > Notify purchases offline" section, and select the Yes option.
5. In the "Order Status" section, choose the status that purchases must have to be registered offline in Connectif.
6. Reactivate the Connectif module from the "Basic Configuration > Activate" section by selecting the Yes option.
7. Click Save Config.
3. How to configure Connectif in a multi-language Magento store?
Magento allows creating three levels of entities in an account:
- Website: usually there is only one, corresponding to the domain.
- Store: the different store(s), for example, by language.
- Store view: other details for stores, for example, the same language but different currency.
The Connectif module can be configured at any of these levels according to the eCommerce needs, but some aspects must be considered:
- Magento configuration types, since if configured in "Default" mode, the settings will apply to all Magento levels.
- To send data from different Magento levels to the same Connectif store, the same Client ID and Secret Key must be used in the configuration.
- It is recommended, except in very complex cases, to activate the default configuration at the time of integration to configure all levels the same way.
If you have multiple languages and/or currencies you want to configure, it is common to make the article adjustments at the Store View level separately.
4. How to recover abandoned carts with the Cart Recovery URL
(This section explains how the Cart Recovery URL works to obtain the items associated with a specific cart).
Through the integration with Magento, a Cart Recovery URL is sent to Connectif, that is, a link to recover the items related to that cart, which can be used in workflows and content.
To obtain the cart recovery URL through a workflow, it must be done via the "Get last cart" and "On cart abandonment" nodes, then mapped in the variables of the content to display or send.
- Learn how this URL works in different CMS and how to use it in this article.
5. How to collect product brand in Magento
To collect the "Brand" field in the Connectif product sheet in the Magento integration, it is necessary to activate the "Manufacturer" field in Magento and provide the corresponding values so that it arrives automatically.
This field is not active by default in Magento, so to activate it you must follow these steps:
1. Go to "Stores > Attributes > Attribute Set".
2. Locate the "Default" attribute group.
3. Double-click to edit it, and once inside, add the "manufacturer" field to the "Product Details" folder by clicking on it and dragging it inside the folder.
4. Click Save to confirm this configuration. This way, the data in the "manufacturer" field will always be transmitted for products that have this attribute group.
5. If you have other product attribute groups in your catalog from which you want to transmit the brand, you must repeat the process.
6. To ensure that the field will be transmitted in the different product groups, you can check any product in your catalog that belongs to one of them and make sure the "manufacturer" field is included in its Magento sheet. Inside it, you can also change it if needed through the dropdown.
6. What should I consider if my Magento 2 store uses Hyvä?
If your store uses Magento 2 with Hyvä, you must check that the template uses Magento's standard JavaScript initialization system *-init to properly launch Connectif scripts.
This configuration is necessary because Hyvä modifies Magento's frontend system and can change how some scripts are initialized. The Connectif module relies on Magento's standard mechanism to execute tracking and contact identification scripts.
To complete the integration, check with your development team that the Connectif scripts are initialized using *-init, using data-mage-init or text/x-magento-init, as appropriate.
Once this configuration is applied, validate that the integration correctly captures the main store events. You can see how to do this in this article.
Keep Learning!
To take full advantage of your Connectif account’s potential, we recommend continuing with the following articles:
Onboarding, to gain proficiency with our interface.
Initial Workflows, to implement your first strategies in the account.
Integrations with External Systems, to integrate with Facebook, forms, and webhooks on your website.
API Integrations, to manage events such as purchase registrations or contact sign-ups.