Loading...
Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

(warning)(warning) The integration of Roistat with YCLIENTS works with records and contacts.

...

(отметить) If you create a lead manually, you can fill in the "roistat" field with the data of the source of the lead. The information about the source of the lead will be displayed in Analytics. 

To bind the lead to the specified marketing channel, enter the following markers in the roistat field:

  • google{ID}, if you want to bind the deal to the Google Adwords channel. For example, google3.
  • merchant{ID}, if you want to bind the deal to the Google Merchant Center channel. For example, merchant4.
  • facebook{ID}, if you want to bind the deal to the Facebook channel. For example, facebook6.
  • seo_google, if you want to bind the deal to the SEO - Google channel.

Step 3. Connect the

...

YCLIENTS in the Integrations list

  1. Open the Integrations list.
  2. Select the YCLIENTS and click the Connect button. 
  3. Fill in the authorization fields of YCLIENTS:
    1. Enter the email address or telephone number of your account in the Login field. The number should be entered in the following format: 1xxxxxxxxxx.
      (warning) Make sure that this user is added in the configurations of the main net and has admin acces. 

      Expand
      titleHow to verify if the user is added to the configurations of main net

      a. Determine the main network of the branch. To do it, open the interface of the branch and open Settings → Networks.  

      b. Go to the settings of the main network and open Settings → Users. Verify if the user is added to the network configuration and has the full access rights. 
      (warning) If you cannot select the network in the interface, contact the administrator of this network.

      b. Enter your account password in the Login field.  

  4. Click the Save button. Statuses of the deals from YCLIENTS will be loaded.
  5. Distribute the statuses of the deals by dragging them into the statuses groups.
  6. Click the Continue button. 
  7. Specify the parameters for the additional configuration:
        a. Specify the parameters of the filtration of deals.
        b. Specify the values of business indicators. 
        c. Click the Save button. 
  8. Enter the IDs of your managers in the Deals responsible managers field.

    Expand
    titleHow to find out the ID of the manager
    1. Log in to your YCLIENTS account, open the Managers section and click on the name of the needed manager.  
    2. The ID of the manager is displayed in the address bar after the master_id=.

     Enter the ID of the company of your responsible managers in the Company of the responsible managers field. 
    To find out the ID of the company, open Browse → Report. You will see the ID of the company in the Branch ID field.

  9. Click the Save button.
  10. Go to YCLIENTS and open Online-record → Website → Script injection.
  11. Enter the following code into the HTML code field:

    Code Block
    languagejs
    <script>
    (function(w, d, s, h, id) {
       w.roistatProjectId = id; w.roistatHost = h;
       var p = d.location.protocol == "https:" ? "https://" : "http://";
       var u = /^.*roistat_visit=[^;]+(.*)?$/.test(d.cookie) ? "/dist/module.js" : "/api/site/1.0/"+id+"/init";
       var js = d.createElement(s); js.charset="UTF-8"; js.async = 1; js.src = p+h+u; var js2 = d.getElementsByTagName(s)[0]; js2.parentNode.insertBefore(js, js2);
    })(window, document, 'script', 'cloud.roistat.com', 'tracking code key');
    </script>
    <script>
       window.onRoistatModuleLoaded = function () {
           var params = window
           .location
           .search
           .replace('?','')
           .split('&')
           .reduce(
               function(p,e){
                   var a = e.split('=');
                   p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]);
                   return p;
               },
               {}
           );
           if (params['yextrafield_roistat']) {
               window.roistat.setVisit(params['yextrafield_roistat']);
           }
       };
    
    window.roistatVisitCallback = function (visitId) {
          console.log('visitId', visitId);
            
    window.yclientsAdditionalOptions = {
                bookingCustomFields: {
                    roistat: visitId
                }
            };
        };
    </script>
    
    

    and enter the roistat tracking code key instead of 'tracking code field' using the ' ' brackets. 

  12. Click the Save button.

...

If the transmission of deals from website to CRM is already configured with the help of your code, fill in the additional field "roistat" with the browser cookie roistat_visit

Here is the code you can use to receive the value of this cookie:

$roistatVisitId array_key_exists('roistat_visit'$_COOKIE) ? $_COOKIE['roistat_visit'] : "неизвестно";

Verifying the performance

  1. Create the lead on the website.
  2. Open the Integration list in your project. 
  3. Find the amoCRM integration and click the Configure button. 
  4. Click the Sent leads button and find the lead you created.
  5. Check if the visit number is specified in the Promo code field.  
  6. Find the successful status of the lead (Image Modified) is in the Sent field.
  7. Find the new lead with the visit number in your CRM.