When integrating 3rd party systems, it is often critical to pass UTM variables through your links. This is how many CRM and sales-engagement systems track who is clicking on your links.

For example, when you send an email campaign, If your home page URL (www.MyCompany.com) is opened from that email but it includes a UTM key and a unique ID value (www.MyCompany.com?utm_company=Acme), it can then track that particular email send, the system can then tell you precisely what email triggered the open. This makes tracking possible.

Importantly, it also makes personalization possible for your chat experience.

To pass those URL UTM variables in your Ramble script, include the bolded lines below:

  <script type="text/javascript"> 
    function onRambleLoad() {
      var vars = {};
      var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = decodeURI(value);
	switch(key){
	  case 'name' : nameVar = decodeURI(value); break;
	  case 'email' : emailVar = decodeURI(value); break;
	  case 'company' : companyVar = decodeURI(value); break;
	  case 'website' : websiteVar = decodeURI(value); break;
	  case 'phone' : phoneVar = decodeURI(value); break;
	}
      });
      Ramble.init({
        code: "b8cc75be1f",
        realtimeUrl: "https://realtime.ramblechat.com",
        fileStoreUrl: "https://cdn.ramblechat.com",
        initialName: nameVar,
        initialEmail: emailVar,
        initialCompany: companyVar,
        website: websiteVar,
        phone: phoneVar,
        customVariables: vars
      });
    }
  </script>

Within the Ramble portal workflow section, Ramble allows you to reference variables passed using system.variables.{variable_name}. So, in your Ramble portal setup the proactive message to reference the full UTM in brackets like this:

  Hello {system.variables.utm_company}

And your visitor will be greeted by their company name.