Guide to Integrating with Magento 2

If your eCommerce site is developed in Magento, you can easily integrate it with Connectif and start collecting your customers’ data to create your campaigns.

In this article, you will learn how to install and configure the Connectif module for Magento 2.

 
Implementation time: 15–20 min.
Difficulty: Advanced (technical knowledge required).
When to use it: When you open your Connectif account.

 

STEP 1. Downloading and installing the Magento 2 module

Depending on the version of Magento your eCommerce site has, you will need to follow different steps:

 

A. Versions earlier than Magento 2.2

A.1. Downloading the module

1. Log in to your Connectif account.

2. Go to Store Settings in the left-side menu.

3. In the eCommerce platforms section, look for Magento and click Edit.

Guia para integrar con Magento 2 Ene 25 - 10-min.png

 

4. In the Configuration section, click Download Magento 2 Module to download the “connectif.zip” file to your computer.

Guia para integrar con Magento 2 Ene 25 - 11-min.png

 

A.2. Copying the Connectif folder to the Magento installation

5. Copy the "Connectif" folder and all its contents into the "/app/code/" folder, located in the root directory of the Magento 2 installation.

 

If the "/app/code/" folder does not exist, you must create it.

 

For example, if the Magento 2 installation path is "/var/www/html", you must copy the "Connectif" folder to "/var/www/html/app/code/Connectif".

 

A.3. Installing the module

6. Access the Magento 2 administration panel and go to the "System > Web Setup Wizard" section.

 

Setup Wizard was removed starting with Magento version 2.4.0, so you must enable the integration using commands, which are available in point 2b of the installation documentation attached to the "connectif.zip" file downloaded in step 2. Find more information in the Magento documentation.

Magento_Integracion_-_3.png

 

7. In Module Manager, look for the Connectif_Integration module and select Activate.

Magento_Integracion_-_4.png

 

8. Follow the steps indicated by the Connectif module installation and click Next:

  • Readiness Check: at this step, checks are performed related to the PHP version, cron jobs, dependencies, and extensions.

Magento_Integracion_-_5.png

 

  • Backup: at this step, a backup of the eCommerce site is created before installing the module. 

Magento_Integracion_-_7.png

 

  • Enable module: at this step, the module is activated. 

Magento_Integracion_-_8.png

 

B. Versions later than Magento 2.2

B.1. Downloading the module

1. Log in to your Connectif account.

2. Go to Store Settings in the left-side menu.

3. In the eCommerce platforms section, look for Magento and click Edit.

Guia para integrar con Magento 2 Ene 25 - 10-min.png

 

12. In the Configuration section, click Download Magento 2 Module to download the “connectif.zip” file to your computer.

Guia para integrar con Magento 2 Ene 25 - 11-min.png

 

B.2. Copying the Connectif folder to the Magento installation

13. Log in to the Magento 2.x store using an SSH connection.

14. After successfully logging in via SSH, use the command line (shell) to go to the Magento root directory where Magento 2 is installed.

15. Upload the module (as Zip or tar.gz) to the Magento 2 installation root directory.

16. Extract the file into a temporary directory.

17. The extracted module must be copied to “app/code/Connectif/”. Create this folder with the following command:

mkdir –p app/code/Connectif/

18. Copy the contents of the extracted 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 directory: 

php bin/magento setup:upgrade

20. Compile the installed module with:

php bin/magento setup:upgrade

21. Clear the cache with:

php bin/magento cache:flus
 

The module will be installed and visible under Stores > Configuration > Advanced > Advanced. The module will appear in this section’s list of installed Magento modules.

 

STEP 2. Activating the module

  

This configuration is the same for versions earlier and later than Magento 2.2.

22. Go to "Stores > Configuration > " and locate the Connectif configuration.

Guía para integrar con Magento 2 - 1.png

 

23. In Basic Configuration, select Yes in the Activate field to complete the Client ID and Secret Key fields.

 

Do not close this tab; you will need it to complete your account information.

Guía para integrar con Magento 2 - 2.png

 

24. Go to your Connectif account and, in the "Integrations > Magento" section, copy the Client ID and Secret Key.

Guia para integrar con Magento 2 Ene 25 - 12-min.png

 

25. Return to Magento 2 and paste them into the corresponding fields.

Guía para integrar con Magento 2 - 3.png

 

26. Click "Save Config" to save the changes.

 

 

Success! 
Your Connectif integration with Magento is ready.

  

Once you have finished configuring the plugin, we recommend verifying that the integration is working correctly. You can learn how to do this in this article.

 


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 used for?

The Connectif module in Magento consists of different sections, each of which serves different purposes:

  • Basic Configuration (1): this section is used to configure the basic aspects of your Connectif account in Magento, documented in this article, and start implementing your strategy. 

Guía para integrar con Magento 2 - 4.png

 

  • Customer (2): this section allows you to configure the information about Magento contacts that will be sent to Connectif: 
    • Create newsletter subscribers if customer does not exist?: this option lets you choose whether to create the contact in Magento as a newsletter subscriber if they do not exist in Magento when the subscription or unsubscription is notified by Connectif.
    • Configure Customer Fields: this option allows you to link the contact fields available in the CMS (left selector, Customer Field) and associate them with the ID of the field created in Connectif (right selector, Connectif Field ID).

Guía para integrar con Magento 2 - 5.png

 

  • Product (3): this section is used to configure the basic aspects of your Magento products to synchronize them with Connectif:
    • Use product SKU identifier?: this option allows you to use the SKU as the product identifier in the Connectif catalog.
    • Product image ID: this option allows you to determine the image size that Connectif will collect. 
    • Use full category path: this option allows you to send the product’s full category path, including parent categories, even if they are not directly assigned to the product.
    • Show product view with proper currency when Connectif verify the product: this option applies if product synchronization is performed via web scraping. It allows you to indicate whether, when the Connectif mechanism visits the website to synchronize or verify a product, it should do so using the same currency configured in Connectif.
    • Custom Field 1, Custom Field 2 and Custom Field 3: these options allow you to configure the custom fields for product variants that will be sent to Connectif.

Guía para integrar con Magento 2 - 6.png

 

  • Cart and order (4): this section allows you to configure the cart and purchase information that you will send to Connectif:
    • Print only mandatory fields on cart tags?: this option allows you to determine whether the Connectif script will collect only the required cart fields (product ID, name, price, and URL). This option improves the performance of the cart tag in Magento.
    • Use product variants on cart and orders?: this option allows you to determine whether, when Connectif receives product information from the cart, it will collect the default product or the specific variant.
    • Notify orders offline: this option allows you to determine whether the eCommerce site will notify Connectif of offline purchases via API and without web context.
    • Order Status: this option allows you to determine the status that purchases must have to be registered via API (offline notifications) in Connectif. 

Guía para integrar con Magento 2 - 7.png

 

  • Advanced Configuration (5): this section is used to establish certain behaviors for the Connectif integration:
    • Use optimized Connectif tags: this option allows you to optimize the generation of Connectif tags to improve loading times. When activated, real-time contact data synchronization is also automatically enabled.
    • Real-time customer data sync: this option allows you to synchronize changes made to contact data with Connectif in real time, such as their information, addresses, and newsletter subscriptions.
 

If your eCommerce site has customizations related to the generation of Connectif tags, they may be affected when “Use optimized Connectif tags” is activated.

Guía para integrar con Magento 2 - 8.png

 

  • Banners (6): this section is no longer used, since banner-format content is configured directly in Connectif.
  

The content types "Modal windows" and "Banners" have not been used since 2021. This article explains how to migrate them to Connectif.

Guía para integrar con Magento 2 - 11.png

 

  • Public URLs (7): this section is used to view the activation URLs for the Service Worker and the subscription notification URLs.

These URLs are generated and sent to Connectif when the module is installed in Magento.

Guía para integrar con Magento 2 - 12.png

 

 

2. How do I activate offline purchase notifications (via API)?

  

Notifying offline purchases means that they do not have web context; instead, the notification is sent asynchronously via API. If there is a strategy that reacts to the purchase with web content, it will not affect contacts whose purchase is registered through the API. 

1. In your Magento account, go to "Stores > Configuration", click Connectif , and then click Settings.

Guía para integrar con Magento 2 - 13.png

 

2. Disable the Connectif module in the "Basic Configuration > Activate" section by selecting No.

Guía para integrar con Magento 2 - 14.png

 

3. Click Save Config.

 

You must save the configuration immediately after this step to enable offline purchases.

4. Go to the "Cart and Order > Notify purchases offline" section and select Yes.

Guía para integrar con Magento 2 - 15.png

 

5. In the "Order Status" section, choose the status that purchases registered offline in Connectif must have.

  

The status selection will depend on the payment method, Magento configuration, and business model. You can select only one status.

Guía para integrar con Magento 2 - 16.png

 

6. Re-enable the Connectif module in the "Basic Configuration > Activate" section by selecting Yes.

Guía para integrar con Magento 2 - 17.png

 

7. Click Save Config.

 

3. How do I configure Connectif in a multilingual Magento store?

Magento allows you to create three levels of entities for an account:

  • Website: there is usually only one, corresponding to the domain.
  • Store: the different store(s), for example, by language.
  • Store view: other store details, such as different currencies in the same language.

The Connectif module can be configured at any of these levels according to the eCommerce site’s needs, but some aspects must be taken into account:

  • Magento configuration scopes, since if a configuration is made in "Default" mode, it 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.
  • Except in very complex cases, it is recommended to activate the default configuration when integrating, so that all levels are configured identically.

If you have several languages and/or currencies that you want to configure, it is common to make the article’s adjustments separately at the Store View level.

Guía para integrar con Magento 2 - 18.png

 

4. How to recover abandoned carts using the Cart Recovery URL

(This section explains how the Cart Recovery URL works to obtain the items associated with a specific cart.)

Through the Magento integration, 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, you must use the "Get last cart" and "On cart abandonment" nodes, and then map it to the variables of the content to be displayed or sent.

  • Learn how this URL works in different CMSs and how to use it in this article. 

 

5. How to collect product brands in Magento

To collect the "Brand" field in the Connectif product record in the Magento integration, you must activate Magento’s "Manufacturer" field and provide its corresponding values so that they are sent automatically.

This field is not enabled by default in Magento, so you must follow these steps to enable it:

1. Go to the "Stores > Attributes > Attribute Set". section.

Guía para integrar con Magento 2 - 19.png

 

2. Locate the "Default" attribute group.

Guía para integrar con Magento 2 - 20.png

 

3. Double-click to open its settings and, once inside, add the "manufacturer" field to the "Product Details" folder by clicking it and dragging it into the folder.

Guía para integrar con Magento 2 - 21.png

4. Click Save to confirm this configuration. This way, the data from the "manufacturer" field will always be sent for products that have this attribute group.

 

For the brand to be sent to Connectif automatically through this process, you must have created it within this field. If you created it using another field, you must adapt it to this procedure.

Guía para integrar con Magento 2 - 22.png

 

5. If you have other product attribute groups in your catalog whose brands you want to send, you must repeat the process.

Guía para integrar con Magento 2 - 23.png

 

6. To make sure that the field will be sent for the different product groups, you can review any product in your catalog that belongs to one of them and make sure that the "manufacturer" field is included in its Magento record. You can also change it there, if necessary, using the dropdown.

Guía para integrar con Magento 2 - 24.png

 

6. What should I consider if my Magento 2 store uses Hyvä?

If your Magento 2 store uses Hyvä, make sure you have version 1.46.0 or later of the Connectif module installed, which includes compatibility with this theme.

 

If you use Hyvä Checkout, note that tracking the data entered by the customer during checkout, such as their email or address, is not available in this integration.

 


Keep learning!

To take full advantage of your Connectif account, we recommend continuing with the following articles: