This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

cms:onBeforeTrackingCodeInclude event

Triggered by Cms_Controller
Author LemonStand eCommerce Inc.

Event handler signature

public boolean event_onBeforeTrackingCodeInclude(string $code)
$code string specifies the tracking code string to be injected to the page.
{return} boolean returns FALSE if the tracking code should not be displayed.
Allows to deny Google Analytics tracking code output on a page. The event handler should return FALSE to stop LemonStand from injecting Google Analytics tracking code to a page.
Usage example:
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onBeforeTrackingCodeInclude', $this, 'before_tracking_code_include');
}

public function before_tracking_code_include($code)
{
  // Perform some checks 
  if ($some_condition)
    return false;

  return true;
}