Embedded Form Page
This method allows you to integrate the campaign widget to easily blend in with the layout of your entire web app.
Embedding your widget also makes it visible immediately on initial page load without having to click on a button or look for a visible pop-up.
It's the best way to have ralipo campaign on your page to blend with your website design.
There are two forms in which embedded form page can be added to your project, which are:
-
iFrame: Also known as inline Frame, iFrame allows you to load a new page in another html page. All you need is to add the
tag ralipo provides into your codebase and decide the position from the code.iFrame
-
Web Component: Here, a javascript code snippet ( which can be copied ) for the campaign form widget is generated. The javascript snippet is a IIFE (Immediately Invoked Function Expression), let's save the technicality for later.
How to add an embedded form page to your web application
-
iFrame: To add an embedded campaign form page through iFrame, simply copy the iFrame tag in the image below and add to your html.
Here's how the iFrame tag is added in an html code
-
Web component: To add a Ralipo embedded campaign form through the use of web component, you have to add
- An IIFE (Immediately Invoked Function Expression) within a script tag of your html Code
- Then add an
tag in the html body.<ra-embed>
Here's a code sample to explain how you can do this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IFrame Tag</title>
</head>
<body>
<h1>Welcome to Our Page</h1>
<p>Fill our Form below</p>
<ra-embed campaign-api-key="***|***************"></ra-embed>
<script>
(function (n, r, c, o) {
const e = n.document.createElement("script"),
t = r.getElementsByTagName(c)[0];
(e.async = !0),
(e.type = "module"),
(e.src = o),
t.parentNode?.insertBefore(e, t);
})(
window,
document,
"script",
"https://widget.ralipo.com/ralipo/ralipo.js",
"ralipo"
);
</script>
</body>
</html>
Important:
You need to replace ***|***********
with your unique widget ID. You can find your widget ID in the campaign settings page.