The ActiveCampaign Integration package allows you to integrate Wix Stores with the e-commerce marketing automation service, ActiveCampaign.
With this package you can set up a 3rd-party integration (connection) for your Wix Store in ActiveCampaign. When a customer submits payment for a new order in your Wix Store, the order information is sent to ActiveCampaign. ActiveCampaign creates a customer profile with the order information, or adds the order information to the existing customer’s profile.
Before using the package, set up the following:
velo-activecampaign-key
. Store your ActiveCampaign key in the secret.Do the following in your config.json backend file to create a connection from your Wix Store to ActiveCampaign:
Set the apiAccessUrl
value to your ActiveCampaign API Access URL.
Set the properties of the initData
object to the values specified below.
service
: The name of your service (for example, Wix Store).externalid
: The ID of your store. Must be a string (for example, ’myWixStoreId’
.name
: The name associated with the account such as your company name (for example, ’Toys Store’
).logoUrl
: The image URL of your store logo.linkUrl
: Link to a URL where your integration can be managed. For example, you can link to the Wix Store Products page in your Dashboard. The link is for tracking purposes.Note that the information you define in the config file will be displayed as follows in your ActiveCampaign Integrations panel once you finish creating a connection. To get to the Integrations panel, on the left side of your dashboard click Settings > Integrations.
Set the id
value. You will get this value after you create your connection. Follow these steps to create your connection:
a. Create a new '.js' file in the backend section of your site (for example, ‘test.js’).
b. Add the following code to this file:
c. To run this function from the Editor, click the green arrow next to the function. A new tab will open in the code panel for running the function.
d. Click Run in the right column to run the function. You will find your id in the function output. This is your connection ID. Set it as the id
value in the config.json file.
The following backend files are included in the package. Note that only exported package functions that you can use in your site are listed here.
The code in this editable file contains the configurations needed to use this package. Follow the instructions in the Setup section to set up the configurations.
The code in this file defines functions used to work with the ActiveCampaign API.
The code in this file contains a function that uses the information you set in your config.js file to create a 3rd-party integration (connection) for your Wix Store in ActiveCampaign API.
The code in this file contains an event that calls the orderHandler()
function to handle and send a customer’s order information from your Wix Store to ActiveCampaign upon payment of a new order. This file contains the following function:
Sends customer order information (customer number and ID) to ActiveCampaign when a customer submits payment for a new order in your Wix store.
The code in this file contains functions that handle orders and send them to ActiveCampaign.
The code in this file contains a function that creates a test order from your Wix Store. You can run this function before your site is live to make sure the package is working properly.
makeTestOrder()
Creates a test order from your Wix Store and sends it to ActiveCampaign.
This section demonstrates how you can work with the package. Note that this package does not require you to add any code. To use this package, you need to complete all steps of the Setup section.
Once a customer submits payment for an order, you should see the order in your ActiveCampaign site. To see the order, click Contacts and then click the contact whose order you want to see. In the example below, you can see Jane Doe’s order made from our Wix Toys Store.
To test the package and see orders from your Wix Store in ActiveCampaign without a customer order, follow the steps below:
Complete the steps in the Setup section, if you haven't already.
Create a new '.js' file in the backend section of your site (for example, ‘order.js’).
Add following code to this file:
To run this function in the Editor, click the green arrow next to the function like you did in step 3c. of the Setup.
Click Run in the right column to run the function. The function will run a test order with sample customer information listed in the package’s test.js file.
Check the order by going to ActiveCampaign > Click Contacts and you should see our test order under the email address, ‘john.doe@somedomain.com’.
This Velo package uses the following npm package. To view the npm license, see the npm readme.
1.0.0 Initial version.
1.6.0 Add Name and Phone Syncing.
wixStores, activeCampaign, e-commerce, marketing, automation