如何插入CRM集成代码?

时间:2017-02-09 作者:Vlodko

我使用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>

1 个回复
SO网友:Svartbaard

Option 1

为登录页创建自定义模板:

 /**
 *  Template Name: My landing page
 *
 */
并手动添加代码,就像添加到静态站点一样。

Option 2

在登录页上为您的代码创建一个自定义字段,并在上面创建的模板中输出元内容。

Option 3

在头文件中为登录页编写一条条件语句,并插入代码段。

if (is_page( \'Landing Page\' )) {

//do stuff

相关推荐

Where is this inline CSS code

CSS代码在哪里?我是说margin-top: 46px !important!;我需要把它改成1px 去掉上边距。但我没有在任何主题的文件中找到它。Note: I have searched the texts in all files using FileSeek Pro. 但什么也没发现。(即使Firefox中有Inspect元素)