DevCEDTeam / CED

0 stars 0 forks source link

Description #37

Open DevCEDTeam opened 1 year ago

DevCEDTeam commented 1 year ago

Google Site Webform

To develop a Google Site with an embedded Mautic form, follow these step-by-step instructions:

  1. Create a Google Site:

    • Log in to your Google account.
    • Go to https://sites.google.com/ and click on the "Go to Google Sites" button.
    • Click on the "+" icon to create a new site.
    • Choose a template or start with a blank site.
    • Customize your site by adding pages, text, images, etc.
    • Make sure to publish your site by clicking on the "Publish" button and following the prompts.
  2. Set up CORS settings in Mautic:

    • Log in to your Mautic instance.
    • Click on "Configuration" in the top menu bar.
    • Look for the "CORS settings" option.
    • Add the Google Site domain to the list of allowed domains. For example, if your Google Site URL is "https://sites.google.com/example", add "sites.google.com" to the CORS settings.
    • Save the changes.
  3. Embed the Mautic form in your Google Site:

    • Go back to your Google Site editing interface.
    • Select the page where you want to embed the Mautic form.
    • Click on the "Embed" option or the "< >" icon to insert HTML code.
    • In another browser tab, open your Mautic instance and go to the desired form.
    • Instead of using the default script, choose the manual copy option.
    • Copy the provided script.
  4. Insert the Mautic form script into your Google Site:

    • Go back to the Google Site editing interface.
    • Paste the copied Mautic form script into the HTML code area.
    • Save the changes.
    • Publish your Google Site again to make the changes live.
  5. Test the embedded Mautic form:

    • Open a new private/incognito window in your browser.
    • Access your published Google Site using the private/incognito window.
    • Verify that the form appears and functions correctly.
    • Check the browser console for any potential cross-domain access errors.

Note: If you encounter cross-domain access issues, follow the additional steps below:

  1. Disable cross-domain access restrictions in Mautic:

    • Go back to your Mautic instance.
    • Navigate to the "Configuration" section.
    • Locate the CORS settings again.
    • Set "Restrict" to "No" to disable cross-domain access restrictions.
    • Save the changes.
  2. Alternative approach for script loading issues:

    • Go to your Mautic form.
    • Instead of using the automatic script, choose the manual copy option.
    • Copy the provided form script.
    • Return to the Google Site editing interface.
    • Find the embedded Mautic form code and replace it with the manual copy form script.
    • Save the changes and publish the site.
  3. Test the form again:

    • Open a new private/incognito window.
    • Visit your published Google Site once more.
    • Verify that the form now appears and functions correctly.

By following these steps, you should be able to develop a Google Site with an embedded Mautic form and ensure proper cross-domain access using the CORS settings in Mautic.