我使用CRM(bpm\'online),希望将注册数据直接从站点发送到CRM。现在我通过谷歌表单来做。CRM供应商提供了HTML代码,应在标记(/正文)之前安装到登录页的代码中。问题是这个解决方案适用于静态HTML站点,同时Wordpress执行PHP代码来生成动态HTML。所以,问题是我应该在哪里安装此代码以在CRM中收集注册表(联系表单7)?谢谢
下面是提供的代码示例
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://webtracking-v01.bpmonline.com/JS/track-cookies.js"></script>
<script src="https://webtracking-v01.bpmonline.com/JS/create-object.js"></script>
<script>
/**
* Replace the "css-selector" placeholders in the code below with the element selectors on your landing page.
* You can use #id or any other CSS selector that will define the input field explicitly.
* Example: "Email": "#MyEmailField".
* If you don\'t have a field from the list below placed on your landing, leave the placeholder or remove the line.
*/
var config = {
fields: {
"Name": "css-selector", // Name of a visitor, submitting the page
"Email": "css-selector", // Visitor\'s email
"Zip": "css-selector", // Visitor\'s ZIP code
"MobilePhone": "css-selector", // Visitor\'s phone number
"Company": "css-selector", // Name of a company (for business landing pages)
"Industry": "css-selector", // Company industry (for business landing pages)
"FullJobTitle": "css-selector", // Visitor\'s job title (for business landing pages)
"UseEmail": "css-selector", // Logical value: \'true\' equals to visitor\'s opt-in to receive emails
"City": "css-selector", // City
"Country": "css-selector", // Country
"Commentary": "css-selector" // Notes
},
landingId: "5e90c84e-62b1-4797-a018-5a1ba24d7395",
serviceUrl: "https://www.link",
redirectUrl: "http://here is link/"
};
/**
* The function below creates a object from the submitted data.
* Bind this function call to the "onSubmit" event of the form or any other elements events.
* Example: <form class="mainForm" name="landingForm" onSubmit="createObject(); return false">
*/
function createObject() {
landing.createObjectFromLanding(config)
}
/**
* The function below inits landing page using URL parameters.
*/
function initLanding() {
landing.initLanding(config)
}
jQuery(document).ready(initLanding)
</script>