<?php
/**
 * @file
 * Conditionally include VWO Smart Code.
 *
 * You MUST replace all instances of EXAMPLE in this file with the machine
 * chosen for this module.
 * eg. Replace all instances of EXAMPLE with vwo_john_filter
 *
 * To avoid the main VWO module competing with this one to add the JS, it
 * should have the "Enable Visual Website Optimizer" option set to "Disabled".
 */

/**
 * Implements hook_init().
 */
function EXAMPLE_init() {

  // Write your own custom code to include the javascript here, or uncomment
  // one of the sections below if it meets your needs.
  // The function to call to include the JS is:
  //   visual_website_optimizer_add_js($custom_url);
  // $custom_url should be a fully qualified absolute URL eg.
  //   http://yoursite.com/kittens_and_puppies

  // A fully qualified absolute URL can be generated from the site
  /*
  $custom_url = url('kittens_and_puppies', array('absolute' => TRUE));
  */

  // Match based on node type.
  /*
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(arg(1));
    if ($node->type == 'product') {
      visual_website_optimizer_add_js();
    }
    elseif ($node->type == 'super_product') {
      visual_website_optimizer_add_js($custom_url);
    }
  }
  */
}
