- Loading...
Page History
Table of Contents
There are two ways of transfer of sending the leads to CRM:
- In the first case, data is transferred from a website to CRM and then is uploaded to Roistat. Read more at Upload of leads to CRM.
- In the second case, data is transferred to Roistat and then is sent to CRM. This way has the following advantages:
- It provides the backup of information about the leads in Roistat.
- It allows quickly to change the configuration of transfer of leads to CRM.
Configuration
To start the configuration, integrate your CRM with Roistat (read the integration manual for your CRM).
...
- In Roistat interface (the easiest way).
- With the help of PHP-code (this way is the most flexible in configuration).
How to configure the transfer of leads to CRM using the Roistat interface
This way is unavailable if the code of the form is placed between <iframe></iframe> tags.
- Open the Settings of your Roistat project and choose the Leads from the website forms tab.
- Click the Add form button.
You will see the New form window. - In the Name field, specify the name of the form that will be sent to the lead's title. Leads created through this form will be called Lead from the Form name form.
- Specify the mechanism of sending the data on the lead:
- Form. Use this mechanism if the leads' forms in the source code of your website are tagged by < form > tag, form fields are tagged by < input > tag, and data is sent by reloading the webpage or by pressing the button with type="submit" type.
- Button. Use this mechanism if the data from the lead's form is sent with the help of AJAX by clicking any type of button.
- After choosing the mechanism of sending the data on the lead, specify For selector or Button selector.
- Form selector is a CSS-selector that verifies the website form, from which Roistat receives the data for forming the lead. No matter how many selectors you specify, one or several, but It is important that these selectors verify the needed form. To specify the selectors, use CSS-notation, for example class selector .registration-form-1 (<form class=“registration-form-1”>), identifier selector #contact-form-1 (<form id=“contact-form-1”>).
Button selector is a CSS-selector that verifies the website button, by clicking on which Roistat receives the data for forming the lead. No matter how many selectors you specify, one or several, but It is important that these selectors verify the needed form. To specify the selectors, use CSS-notation, for example class selector .bnt-primary (<button class=“bnt-primary”>).
Expand title How to get the CSS-selector of form or button - Open the order form on your website. Usually, it is called Shopping cart. If the data of the order is entered directly on your website page, open the page where you can create the order.
- Open the source code of the order form or order page. You can do it with the help of your browser by selecting the content of the form or content of the order page and clicking the Source code of the selected fragment button.
- Search by the keyword form id or form, if you want to get the CSS-selector of form or search by the name of the button from which the order is sent if you want to get the CSS-selector of button.
- Copy the identifier value (id) or class value (class):
- Open the order form on your website. Usually, it is called Shopping cart. If the data of the order is entered directly on your website page, open the page where you can create the order.
- Specify the way of filling the main fields of the form in CRM:
Static value:
In this case, the value entered in the right field is transferred to the lead in CRM without any changes. Click here to see the list of variables you can use to fill the main fields.
Value from the form field:
In this case, the value entered in the form field on the website is transferred to the lead in CRM. For example, if you see <input type="text" name="Phone"...> in the code of the form on your website, you must enter Phone in the phone field. can specify the value of the name attribute by Укажите значение атрибута nameдля поля формы на сайте.Result of JS execution:
In this case, the value received with the help of JS-code is transferred to the lead in CRM. For example, value return $("input[name='email']").val() is transferred to Email field. - If needed, create additional fields of the lead:
You can't add the additional fields if integration with goals is configured in Roistat project.- Open the Additional fields block.
- Select the required field from the dropdown list. The list is uploaded from the integrated CRM.
- Specify the way of filling the additional field (see paragraph 6 of this manual).
If you need to transfer the empty value to the additional field of the lead, specify the Static value and press space bar. - Click the Add button. Добавить и повторите пункты b и c, если требуется больше одного дополнительного поля.
- Click the Save button.
...
Changes will take effect within several minutes, as well as in the issuance of a new visit number.
How to configure the transfer of leads to CRM via Roistat with the help of the code
Here's the example of PHP-code, that collects the data from lead's form and sends this data to Roistat. Use this code as a basis, edit it, and add it to the file that processes the forms on your website:
...
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Anchor | ||||
---|---|---|---|---|
|
Переменная | Значение |
---|---|
{city} | Visitor's city |
{country} | Visitor's country |
{region} | Visitor's region |
{ip} | Visitor's IP |
{phone} | Visitor's phone number |
{name} | Visitor's name |
{email} | Visitor's email address |
{visit} | Visit number |
{firstVisit} | First visit number |
{referrer} | Referrer page |
{domain} | Webaite domain |
{landingPage} | Ladning page |
{source} | Source (marker) |
{orderCreationMethod} | Lead creation method (Calltracking, Lead hunter, etc) |
{utmSource} | The value of visitor's tag 'utm_source' |
{utmMedium} | The value of visitor's tag 'utm_medium' |
{utmCampaign} | The value of visitor's tag 'utm_campaign' |
{utmTerm} | The value of visitor's tag 'utm_term' |
{utmContent} | The value of visitor's tag 'utm_content' |
{callee} | Dialed number (if leads are created by calltracking) |
{caller} | Client's phone number (if leads are created by calltracking) |
{roistatParam1} | The value of visitor's tag 'roistat_param1' |
{roistatParam2} | The value of visitor's tag 'roistat_param2' |
{roistatParam3} | The value of visitor's tag 'roistat_param3' |
{roistatParam4} | The value of visitor's tag 'roistat_param4' |
{roistatParam5} | The value of visitor's tag 'roistat_param5' |
{googleClientId} | ClientId value from Google Analytics |
{sourceLevel1} | The value of level 1 source (marker) |
{sourceLevel2} | The value of level 2 source (marker) |
{sourceLevel3} | The value of level 3 source (marker) |
{sourceLevel4} | The value of level 4 source (marker) |
{sourceLevel5} | The value of level 5 source (marker) |
{sourceLevel6} | The value of level 6 source (marker) |
{sourceLevel7} | The value of level 7 source (marker) |
{sourceAliasLevel1} | Readable title of level 1 source (marker) |
{sourceAliasLevel2} | Readable title of level 2 source (marker) |
{sourceAliasLevel3} | Readable title of level 3 source (marker) |
{sourceAliasLevel4} | Readable title of level 4 source (marker) |
{sourceAliasLevel5} | Readable title of level 5 source (marker) |
{sourceAliasLevel6} | Readable title of level 6 source (marker) |
{sourceAliasLevel7} | Readable title of level 7 source (marker) |
Code Block | ||||
---|---|---|---|---|
| ||||
$roistatData = array( 'title' => 'New deal {visit}', 'name' => 'Client's name {visit}', 'comment' => 'utm_source: {utmSource}, utm_medium: {utmMedium}, utm_campaign: {utmCampaign}', 'fields' => array( '1276733' => '{city}', // Save the visitor's city in the additional field 'tags' => 'Тег1, {utmSource}, {utmMedium}, {utmCampaign}', // Save the value of UTM-tags in tags ), ); |
How does the lead transfer work
- Customer visits your website and creates a lead.
- Lead is created in the Roistat project. You cant inspect the newly created lead by clicking the Sent leads button in your CRM Integrations catalog.
- Roistat verifies if your CRM is integrated into Roistat and if the lead transfer is configured in your CRM.
- If your CRM is not integrated or lead transfer is not configured, the deal will not be created.
If CRM does not send the approve of lead creation, you will see the icon in the Sent field of Sent leads list. After that, Roistat will attempt to send this lead every 30 minutes for 2 days. After receiving the approve from CRM, you will see the icon in the Sent field, and the number of the deal will be shown in the Deal field.
Transfer of the unsent leads to Roistat
Every 2 hours Roistat will attempt to send the unsent leads created within the last 48 hours.