Download the Unific WooCommerce Extension

Installing the Unific Extension in your Wordpress store

Install HubSpot UTK Submission Token script

Installing the Unific Extension in your Wordpress store

To sync your Abandoned Cart data please download and install the Unific WooCommerce plugin as per the steps mentioned below

Unific WooCommerce plugin installation steps

  1. Download Unific WooCommerce plugin
    1. Version 1.0
    2. Beta Version 2.0.1 (Recommended)
  2. Go to plugins section in your WordPress Admin and select Add New
  3. Select Upload Plugin
  4. Choose the downloaded plugin
  5. Click Install Now
  6. Activate Plugin

This installs the Unific WooCommerce Plugin (extension) on your WordPress web site, however you will still need to complete the Unific set up on https://app.unific.com/

Additionally install hubspotutk submission script to your WooCommerce store

This will sync page view information and original source details to HubSpot. Please follow the steps mentioned below, 

  1. Login to WooCommerce admin.
  2. Go to Plugins → Add new
  3. Search for plugin Header and Footer Scripts and install & activate plugin.
  4. Go to Settings → Header and Footer Scripts
  5. Add below script to Scripts in Header field.

<script type="text/javascript">
    (function(){
        var clientVars = {
            identifyEmail: "",
            hubspotutk: ""
        };
        var loadScript = function(url, callback){
            var script = document.createElement("script");
            script.type = "text/javascript";
            if (script.readyState){
                script.onreadystatechange = function(){
                if (script.readyState == "loaded" || script.readyState == "complete"){
                    script.onreadystatechange = null;
                    callback();
                }
                };
            } else {
                script.onload = function(){
                    callback();
                };
           }
           script.src = url;
           document.getElementsByTagName("head")[0].appendChild(script);
        };
        function getCookie(c_name) {
            var c_value = document.cookie;
            var c_start = c_value.indexOf(" " + c_name + "=");
            if (c_start == -1){
                c_start = c_value.indexOf(c_name + "=");
            }
            if (c_start == -1){
                c_value = null;
            } else {
                c_start = c_value.indexOf("=", c_start) + 1;
                var c_end = c_value.indexOf(";", c_start);
                if (c_end == -1){
                    c_end = c_value.length;
                }
                c_value = unescape(c_value.substring(c_start,c_end));
            }
            return c_value;
        }
        var hubspotIdentifyVisitor = function() {
            if(clientVars["hubspotutk"] !== "" && clientVars["identifyEmail"] !== "" && clientVars["identifyEmail"] !== 'undefined') {
                var _hsq = window._hsq = window._hsq || [];
                _hsq.push(['identify', {
                    email: clientVars["identifyEmail"]
                }]);
                _hsq.push(['trackPageView']);
            }
        }
        var unificMain = function($){
            var hubspotutk_cookiename = 'hubspotutk';
            var hubspotutk = null;
            hubspotutk = getCookie(hubspotutk_cookiename);
            if(hubspotutk !== ""){
              clientVars["hubspotutk"] = hubspotutk;
            }else{
              delete clientVars["hubspotutk"];
            }
         
            // For guest customers
            $(document).on("blur", "#billing_email" , function() {
              var emailInputFieldNameValue = $(this).val();
              clientVars["orderEmail"] = emailInputFieldNameValue;
              hubspotIdentifyVisitor();
            });
         
            // For logged In customers
            $('#billing_email').trigger('blur');
        };    
  
        if ((typeof jQuery === 'undefined') || (parseFloat(jQuery.fn.jquery) < 1.7)) {
          loadScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js', function(){
            jQuery1111 = jQuery.noConflict(true);
            unificMain(jQuery1111);
          });
        } else {
          unificMain(jQuery);
        }
    })();
</script>

Unific and WooCommerce Full Setup Instructions

Here are the full setup instructions: http://support.unific.com/en/articles/2905259-connect-woocommerce

Release Notes:

https://help.unific.com/en/update-unific-plugin-in-hubspot