읽는시간

0

읽는시간

0

인사이트

2025. 11. 4.

Framer에 Marketo 폼을 추가하는 방법

Framer에 Marketo 폼을 추가하면 리드 수집, 문의, 지원 요청 및 피드백 수집을 간편하게 할 수 있으며, 사용자 맞춤형 폼으로 마케팅 효율성을 높여줍니다.

블로그 작성자 프레이머 로고

Posted by

블로그 작성자 김예정의 프로필

Translated by

프레이머(Framer)에서 Marketo 폼을 통합하여 리드 수집과 문의 관리를 효율적으로 개선하는 방법을 설명하는 블로그 썸네일, Marketo 폼을 추가하는 단계별 가이드를 포함하고 있습니다.
프레이머(Framer)에서 Marketo 폼을 통합하여 리드 수집과 문의 관리를 효율적으로 개선하는 방법을 설명하는 블로그 썸네일, Marketo 폼을 추가하는 단계별 가이드를 포함하고 있습니다.
프레이머(Framer)에서 Marketo 폼을 통합하여 리드 수집과 문의 관리를 효율적으로 개선하는 방법을 설명하는 블로그 썸네일, Marketo 폼을 추가하는 단계별 가이드를 포함하고 있습니다.

목차

Table of Contents

본 문서는 Framer를 배우는 국내 사용자들이 한글 자료의 부족으로 겪는 어려움을 해결하고자, 공식 블로그의 내용을 한국어로 번역하고 실무에 유용한 정보를 추가했습니다. 프레이머를 사용하는 여러분께 작게나마 도움이 되길 바랍니다.

왜 Marketo 폼을 추가해야 하나요?

Framer 웹사이트에 Marketo 폼을 추가하게 되면, 잠재 고객을 확보하고 마케팅을 효율적으로 관리할 수 있습니다.
아래의 단계에 따라 커스텀 코드 컴포넌트를 이용해 여러분의 사이트에 연결해보세요.

사이트에 Marketo 폼 추가하기

1. Marketo에서 폼 생성하기

가장 먼저, Marketo 웹사이트에 접속하여 로그인하거나 계정을 생성합니다. 해당 가이드를 참고하여 맞춤형 폼을 제작해보세요.

Marketo의 웹사이트로, 이 사이트에서 폼을 생성하는 방법을 설명합니다.

2. 임베드 할 코드 가져오기

폼을 제작한 뒤, 해당 가이드에 따라 임베드 코드를 발급받아주세요.

Marketo에서 임베드 할 코드를 가져오는 방법을 설명합니다.

3. Framer에서 커스텀 코드 컴포넌트 추가하기

  1. Framer에서 Assets 패널로 가서 "Code"를 선택합니다.

  2. "Create Code File"을 클릭 하고 기본 코드를 아래의 스크립트로 바꿔주세요.

import { addPropertyControls, ControlType, RenderTarget } from "framer"
import { useState, useEffect } from "react"
import { SettingsMessage } from "<https://framer.com/m/Utils-QTIc.js@PVRWqcAS5FromVQ03eYl>"

/**
 * @framerDisableUnlink
 *
 * @framerSupportedLayoutWidth any-prefer-fixed
 * @framerIntrinsicWidth 600
 * @framerSupportedLayoutHeight any-prefer-fixed
 * @framerIntrinsicHeight 300
 */
export default function MarketoForm(props) {
    const { embed, style } = props
    const [isEmbedValid, setIsEmbedValid] = useState(false)
    const [formId, setFormId] = useState(null)
    const [script, setScript] = useState(null)
    const [isLoading, setIsLoading] = useState(true)

    if (!embed || embed.length === 0) {
        return (
            <SettingsMessage
                title="Marketo Embed Component"
                description="Enter the Marketo Embed Code here"
                containerStyle={style}
            />
        )
    }

    useEffect(() => {
        setIsLoading(true)
        const embedRegex =
            /MktoForms2\\.loadForm\\("(.+?)", "(.+?)", (\\d+)(?:, .+?)?\\);/
        const embedMatch = embed.match(embedRegex)
        const [, link, value, id] = embedMatch || []

        setFormId(`mktoForm_${id}`)

        const embedFirstLine = `<script src="${link}/js/forms2/js/forms2.min.js"></script>`
        const isValidEmbed =
            embed.startsWith(embedFirstLine) && value && id && link
        setIsEmbedValid(isValidEmbed)

        if (isValidEmbed) {
            const newScript = document.createElement("script")
            newScript.src = `${link}/js/forms2/js/forms2.min.js`
            newScript.async = true

            const handleError = (error, message) => {
                setIsEmbedValid(false)
                setIsLoading(false)
                console.error(message, error)
            }

            const handleScriptLoad = () => {
                try {
                    if (window.MktoForms2) {
                        window.MktoForms2.loadForm(link, value, id)
                    }
                } catch (error) {
                    handleError(error, "Error loading form:")
                }
            }

            newScript.onload = handleScriptLoad
            document.body.appendChild(newScript)
            setScript(newScript)

            try {
                document.body.appendChild(newScript)
                setScript(newScript)
            } catch (error) {
                handleError(error, "Error appending script:")
            }
        }
        setIsLoading(false)

        return () => {
            if (script) {
                try {
                    document.body.removeChild(script)
                } catch (error) {
                    setIsEmbedValid(false)
                    console.error("Error removing script:", error)
                }
            }
        }
    }, [embed])

    return (
        <>
            {isLoading ? (
                <></>
            ) : isEmbedValid ? (
                <>
                    <style>{customCSS}</style>
                    <form id={formId} />
                </>
            ) : (
                <SettingsMessage
                    title="Your embed code is incorrect!"
                    description="Update the Marketo embed form in the component property."
                    containerStyle={style}
                    icon={"🚨"}
                />
            )}
        </>
    )
}

const customCSS = `
    .mktoLabel {
        width: auto !important;
        float: none !important;
        display: block !important;
    }
`

MarketoForm.displayName = "Marketo Form"

addPropertyControls(MarketoForm, {
    embed: {
        title: "Embed Code",
        type: ControlType.String,
        displayTextArea: true,
        description:
            "[Where to find my Marketo embed form](<https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/demand-generation/forms/form-actions/embed-a-form-on-your-website>).",
    },
})

4. 임베드 코드 입력하기

  1. Framer 프로젝트에서 방금 추가한 Marketo 폼 컴포넌트를 선택합니다.

  2. 오른쪽 속성 패널의 Embed Code 입력란에 Marketo에서 복사한 코드를 붙여넣으면 완료입니다.

Framer에서 Marketo 폼을 활용하는 사례

  • 리드 수집: 커스텀 폼을 사용하여 이메일 리스트를 확장시킬 수 있어요.

  • 문의 폼: 방문자가 쉽게 문의를 보낼 수 있도록 하며, 안내를 위한 플레이스 홀더를 추가하는 걸 추천해요.

  • 지원 요청: 간단한 폼으로 지원 요청을 정리하여 지원을 간소화할 수 있어요.

  • 피드백 수집: 제품 기능이나 개선 사항을 수집할 수 있어요.

위 단계를 따르면 Marketo 폼을 Framer 사이트에 자연스럽게 통합할 수 있습니다.
설정 중 문제가 발생하면 Framer의 Contact 페이지를 통해 지원팀에 문의하세요.

본 글은 Framer 공식 블로그의 ‘Adding Marketo Forms to your site’를 번역·각색한 콘텐츠입니다.

블로그 공유하기

블로그 공유하기

Become a
Framer Expert

프레이머 외주가 가능한 전문가라면 누구나 지원할 수 있습니다.
중개 수수료 없이, 전문가와 클라이언트를 직접 연결합니다.

Become a
Framer Expert

프레이머 외주가 가능한 전문가라면 누구나 지원할 수 있습니다.
중개 수수료 없이, 전문가와 클라이언트를 직접 연결합니다.

Become a
Framer Expert

프레이머 외주가 가능한 전문가라면
누구나 지원할 수 있습니다.
중개 수수료 없이, 전문가와 클라이언트를
직접 연결합니다.