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 opening your Connectif account.

 

STEP 1. Downloading and installing the Magento 2 module

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

 

A. Versions earlier than Magento 2.2

A.1. Downloading the module

1. Sign in to your Connectif account.

2. Go to Store Settings in the left sidebar menu.

3. In the eCommerce platforms section, find 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.

 

The Setup Wizard was removed starting with Magento version 2.4.0, so you must enable the integration using commands, which you can find 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, find the Connectif_Integration module and select Activate.

Magento_Integracion_-_4.png

 

8. Follow the steps shown during the Connectif module installation and click Next:

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

Magento_Integracion_-_5.png

 

  • Backup: this step creates a backup of the eCommerce site before installing the module. 

Magento_Integracion_-_7.png

 

  • Enable module: this step activates the module. 

Magento_Integracion_-_8.png

 

B. Versions later than Magento 2.2

B.1. Downloading the module

1. Sign in to your Connectif account.

2. Go to Store Settings in the left sidebar menu.

3. In the eCommerce platforms section, find 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. Sign in to the Magento 2.x store using an SSH connection.

14. After successfully signing 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 to 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 the list of installed Magento modules in this section.

 

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 enable the Client ID and Secret Key options.

 

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

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? You will find useful information here:

1. What is each section of the Connectif module in Magento used for?

The Connectif module in Magento consists of different sections, each with different functions:

  • Basic Configuration (1): this section is used to configure the basic aspects of your Connectif account in Magento, documented in this article, so you can begin 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 allows you to choose whether to create the contact in Magento as a newsletter subscriber if the contact does not exist in Magento when a subscription or unsubscription is notified from Connectif.
    • Configure Customer Fields: this option allows you to link the contact fields available in the CMS (left selector, Customer Field) 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 imagen 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 complete path of the product categories, 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 affects cases in which 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 of the 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 mandatory 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 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 specific behaviors for the integration with Connectif:
    • Use optimized Connectif tags: this option allows you to optimize the generation of Connectif tags to improve loading times. When enabled, 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, including 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 enabled.

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

 

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

Content types such as "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 ServiceWorker activation URLs and subscription notification URLs.

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

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

 

 

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

  

Notifying offline purchases means that they have no 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 Settings.

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

 

2. Disable the Connectif module in "Basic Configuration > Activate" 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 "Cart and Order > Notify purchases offline" and select Yes.

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

 

5. In "Order Status" select 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. Enable the Connectif module again in "Basic Configuration > Activate" 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 stores, for example, by language.
  • Store view: other store details, such as using a different currency for the same language.

The Connectif module can be configured at any of these levels according to the eCommerce site's needs, but you should consider several aspects:

  • Magento's configuration types, since a configuration made in "Default" mode 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, we recommend enabling the default configuration during integration so that all levels are configured identically.

If you have multiple 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, 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 through the Magento integration, you must enable Magento's "Manufacturer" field and enter the 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 "Stores > Attributes > Attribute Set".

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 access its editing page and, once there, 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 ensures that the data in the "manufacturer" field is always transmitted for products that have this attribute group.

 

For the brand to be transmitted automatically to Connectif through this process, you must have created it in 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 transmit, repeat the process.

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

 

6. To make sure that the field will be transmitted 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 menu.

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

 

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

If your store uses Magento 2 with Hyvä, make sure that the theme uses Magento's standard JavaScript initialization system, *-init, to correctly launch Connectif scripts.

This configuration is necessary because Hyvä modifies Magento's frontend system and may 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 through *-init, using data-mage-init or text/x-magento-init, as appropriate.

Once this configuration has been applied, verify that the integration correctly collects the store's main events. You can learn how to do this in this article.

 

 


Keep learning!

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