Help Center

Integration with Wix Stores

To connect Affiracle to your Wix store, follow these 4 simple steps:

  1. Script implementation on all site pages
  2. Script implementation on the Thank You page
  3. Adding an HTML Embed element to the Thank You page
  4. Sending order details from the page code

Step 1 - Implementing the script on all site pages

  1. Log in to your Wix Dashboard.
  2. Go to:
    Settings -> Custom Code.
  3. Click Add Custom Code.
  4. Paste the following code:
  5. <script src="https://miracle.affiracle.com/YOUR_STORE_ID.js"></script>
  6. Name the code: Affiracle - All Pages
  7. Select All Pages and check Load code once.
  8. Select location:
    Head.
  9. Click Apply.

Step 2 - Implementing the script on the Thank You page

  1. In the same Custom Code screen, click Add Custom Code again.
  2. Paste the following code:
  3. <script src="https://affiracle.com/wix-custom-code.js"></script>
  4. Name the code: Affiracle Embed - Thank You Page
  5. Select Specific Pages.
  6. Select the Thank You Page.
  7. Select location:
    Body - End.
  8. Click Apply.

Step 3 - Adding an Embed element to the Thank You page

  1. Open the Wix Editor.
  2. Go to the Pages menu -> Thank You Page.
  3. Add an element:
    Embed -> HTML iframe.
  4. Inside the element, paste the following script:
  5. <script src="https://affiracle.com/wix-embed.js"></script>

Step 4 - Sending order data from the Page Code

  1. Inside the Wix Editor, click the Dev Mode button and turn it on if it isn't active yet.
  2. Make sure you are on the Thank You Page.
  3. Paste the following code into the Page Code section:
  4. $w.onReady(function() { $w('#thankYouPage1').getOrder() .then((order) => { $w('#html1').postMessage(order); }) .catch((error) => {});});

🚀 We're Done!

That's it, the connection was successful! 🎉

Now you can proceed to create your first campaign and start measuring actual sales.

Encountered a problem?
Contact us via the Support Chat in the bottom right corner, and we'll be happy to help.

תפריט נגישות