0

I use the CRM (bpm'online) and want to send the registration data directly from the site to CRM. Now I do it via Google Forms. CRM vendor provides the HTML-code that should be installed onto the code of the landing page before tag (/body). The problem is that this solution works for static HTML sites meanwhile Wordpress performs the PHP-code to generate the dynamic html. So, the question is where exactly should I install this code to collect the registration form (Contact Form 7) in CRM? Thanks!

Below is the sample of provided code

<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 Answer 1

0

Option 1

Create a custom template for your landing page:

 /**
 *  Template Name: My landing page
 *
 */

and add the code manually as you would add to a static site.

Option 2

Create a custom field for your code on the landing page and output the meta content in the template created above.

Option 3

Write a conditional statement in your header file testing for the landing page and insert the snippet.

if (is_page( 'Landing Page' )) {

//do stuff

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.