Magento Integration Guide

Complete guide to integrate MyFormCapture with Magento

Setup time: 10-15 minutes
Difficulty: Intermediate
Compatible versions: Magento 2.x

Integrate MyFormCapture with your Magento store to capture leads from product pages, checkout abandonment, and customer inquiries. Magento powers over 250,000 e-commerce stores worldwide.

Prerequisites

  • A MyFormCapture account - Sign up here
  • Your MyFormCapture integration code from your dashboard
  • Magento admin access
  • Magento 2.x installation
  • Basic understanding of Magento theming
  • FTP/SFTP access (for advanced methods)

Integration Methods

Theme Integration

15 minutes Intermediate

Add MyFormCapture to your Magento theme for comprehensive e-commerce lead capture. This provides the best integration with Magento's features.

1

Locate Theme Files

Find your active Magento theme files for modification.
  1. Navigate to app/design/frontend/[Vendor]/[Theme]/
  2. Or use app/design/frontend/Magento/luma/ for default theme
  3. Create Magento_Theme/layout/ directory if it doesn't exist
  4. Create default_head_blocks.xml file
Important Note
Always work with a custom theme or create theme inheritance to prevent losing changes during Magento updates.
2

Create Layout XML

Add MyFormCapture using Magento's layout XML system.
  1. Create or edit Magento_Theme/layout/default_head_blocks.xml
  2. Add MyFormCapture block to the head section
  3. Save the file
  4. Deploy static content if needed
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="https://widget.callmebackbutton.com/widget.js" />
        <script>
            require(['jquery'], function($) {
                $(document).ready(function() {
                    if (typeof CallMeBackWidget !== 'undefined') {
                        CallMeBackWidget.init({
                            account: 'YOUR_ACCOUNT_ID',
                            platform: 'magento',
                            ecommerce: true
                        });
                    } else {
                        var script = document.createElement('script');
                        script.src = 'https://widget.callmebackbutton.com/widget.js';
                        script.setAttribute('data-account', 'YOUR_ACCOUNT_ID');
                        script.setAttribute('data-magento', 'true');
                        script.setAttribute('data-ecommerce', 'true');
                        document.head.appendChild(script);
                    }
                });
            });
        </script>
    </head>
</page>
Important Note
Using Magento's RequireJS ensures proper loading order and compatibility with Magento's JavaScript framework.
3

Clear Cache and Deploy

Clear Magento cache and deploy static content for changes to take effect.
  1. Run: php bin/magento cache:clean
  2. Run: php bin/magento cache:flush
  3. Run: php bin/magento setup:static-content:deploy
  4. Test your store frontend
Important Note
Magento requires cache clearing and static content deployment after layout changes.

Next Steps

Configure MyFormCapture

  • Set up your business hours and timezone
  • Configure callback phone numbers
  • Set up email notifications
  • Add team members to your account

Advanced Features

  • Set up custom form templates
  • Configure lead scoring rules
  • Integrate with your CRM
  • Set up automated workflows

Need Help?

Our support team is here to help you with your integration.

Contact Support