<script src="https://js.chilipiper.com/marketing.js" type="text/javascript"></script> <script> var cpTenantDomain = "picsart"; // replace with your subdomain var cpRouterName = "pricing-page"; // replace with the router's name var cpHSDataFormIDs = []; // if needed, add the data-form-id or keep empty to accept all forms.
window.addEventListener("message", function (event) { if (cpHSDataFormIDs.length > 0 && !cpHSDataFormIDs.includes(event.data.id)) return; if (event.data.type === "hsFormCallback" && event.data.eventName === "onFormSubmitted") { var lead=event.data.data.submissionValues; for (var key in lead) {if (Array.isArray(lead[key])) {lead[key] = lead[key].toString().replaceAll(",",";");}} ChiliPiper.submit(cpTenantDomain, cpRouterName, {map: true, lead: lead}); } }); </script>