How to integrate with Wix
Wix is a website builder that allows you to quickly create landing pages and small websites using their drag-and-drop builder or by choosing from templates.
By integrating Prefinery with your Wix website, you can add users that submit your Wix form into your Prefinery campaign.
The following requires a Wix paid plan and that your Wix site is connected to a domain.
Following Wix's guide on adding and setting up a form on your site, in the bottom-left corner of your dashboard click on Edit Site to go into the Wix Website Editor.
In the Editor, select the section you want to place your new form into, then click on the Add (+) button > Contact & Forms. Choose the type of form you'd like to use (make sure it will require an email address) and drag-and-drop it into the section.
When you're done adding and configuring your form, click on Publish in the top-right corner then select View Site.
Click on the Inspector Tool, then click on the whole form and you should be able to see the
<form> tag selected in the HTML code view. You will need the value of the
id property - it's the string enclosed with double quotes (in the example below, it'd be
You'll also need to get the
id value of the
<input> tag for the email address field (in the example below, it'd be
You'll need these two values in the next steps.
Following Wix's guide on embedding custom code on your site, from your Wix dashboard navigate to Settings, then under Advanced select Custom Code.
In order to add Custom Code, Wix requires a paid plan and that your Wix site is connected to a domain.
At this point, you have two options depending on how much of the integration you'd like to customize:
|Magic Form||Still in beta. Easy to implement but has limitations (e.g. can only pass email address). Best for non-developers and those without access to a developer to help in writing scripts. Cannot make use of custom events.|
YOUR_EMAIL_FIELD_ID_HERE with the actual IDs you got in step 2.
event.preventDefault(); will stop the original form submit behavior from occurring and is included to ensure that the asynchronous call to add the user to Prefinery completes successfully. You will need to write/provide the form submit event in the
addUser callback function. What code is placed there depends on your requirements.
Proceed to the next step when done.
"Magic Form" Feature
This process is pretty straightforward. From your project dashboard, just head to Installation then in section 2. Push Users into Prefinery find and select Magic Form tab.
Within the tab, click on the " clicking here" link then in the Form Selector field that appears enter your Wix
id value (in the example below, it'd be
#comp-kkcuhzzq). Make sure to include a hashtag
# right before it.
Note: Please allow up to 10 minutes for this change to take effect in case you're wondering why your test submissions aren't getting through. Also make sure that you've entered the correct
id value with the hashtag
# in the beginning, and no whitespace in between.
Skip to the last step when done.
Back in Wix, complete the rest as follows:
Add Code to Pages: All Pages > Load Code on each new page
Place Code in: Head
Hit Apply when done. Also, make sure that the newly-added custom code is Enabled.