Magento 2.x integration setup

To connect your Magento shop to your Heyloyalty account, there’s 3 steps:

  1. Install the extension on your webshop
  2. Connect your Heyloyalty account with the extension on your Webshop (You need an existing Heyloyalty account) and define the information sent for the members
  3. Setup Heycommerce tracking and import historical order data (not mandatory)



If you have made breaking changes to datalayer or renamed elements belonging to the backend of your shop, we might experience issues getting the necessary data. 


Install extension

The first step is to install the plugin directly to your store. If you’re unfamiliar with this, contact your developer or webmaster and have him or her do it.

You can see our Magento Marketplace here: coming soon


There are two ways to install the HeyLoyalty module:

  • (Recommended) Type the command composer require wexo/module-heyloyalty from the magento installation root directory
  • (Not recommended) Copy the module content to the directory app/code located in the magento installation root director.

After this, all you have to do is run the command php bin/magento setup:upgrade, and the module is installed and ready to use.

The module has a few dependencies on internal magento modules:

<module name="Magento_Newsletter"/>
<module name="Magento_Customer"/>
<module name="Magento_Store"/>
These are all required by magento by default


Connect webshop with Heyloyalty account

To connect your Magento Webshop with your Heyloyalty account, you need an existing list on your Heyloyalty account with the fields you’re expecting to store member/customer data.

You’re able to update your fields later on, but as a minimum, you need either email or mobile. 

  1. Go to: and doublecheck that your lists have the fields you want to populate.
  2. After checking the fields on the list, go to: and fetch your API key and API secret.


  1. In the Magento extension, after inputting your API information, choose the list from earlier
  2. Map the fields, so data from Magento ends up on the contact in Heyloyalty

Below you can see an example of the mapping in the extension. It’s important to note that either email or mobile needs data, to create a member.





Setup Heycommerce tracking script and import historical orderdata 

If you want to take advantage of all the options available from Heyloyalty, you can easily activate the script from the extension page.

We make use of the magento standard datastructure. If you’d made changes to the datalayer, this might affect the data we are able to collect. If that’s the case, you are still able to manually implement the tracking script:

You’re also able to import historical orderdata. Data will implement in the background. 

To implement the tracking script, you first need to have an activated Heycommerce account. From the settings, copy your integrationID and add it to the field in the extension page.

If you wish to import the last 2 years of order data, you can easily do so, using the “Send to Heyloyalty” link.


You can define an email address, to see if anything fails, with the import.


Find your trackingID directly in Heyloyalty here:


See example below: 



Lastly you need to define your session time. The session time should match your Heycommerce setup in Heyloyalty. Session time is the amount of time (in minutes), from the customer leaves until events are allowed to fire in Heyloyalty.

Press “Save Config” and everything is set up between your Magento Webshop and your Heyloyalty account.






Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk