How can I send myself an email whenever a user views a Panels page? I have a page that users rarely visit but I would like to send myself an e-mail to the effect of "UID 555 visited the special page."

My site has several hundred pages but I only want to send an e-mail for this specific page.

I thought of using rules (event: when content is viewed), but


this event has to be evaluated on every page hit
it doesn't seem to trigger when the page is embedded within a panel


So, I was wondering if there is some way to easily send myself an email with the UID whenever a user visits a specific panel page.
Add the code below to any of your module. I assumed the name of the module to be my_module.

define('MY_SPECIFIC_NODE_NID', 3); // define the nid for which you want to send email

function my_module_panels_post_render($panels_display, $renderer) {
  $content = $panels_display-&gt;content;
  foreach ( $content as $key =&gt; $value) {
    if($content[$key]-&gt;type == 'node' &amp;&amp; $content[$key]-&gt;configuration['nid'] == MY_SPECIFIC_NODE_NID){
      dpm('This is my node. I will send email here!');
      // Uncomment the line below to actually send email - remember to substitute variables appropriately
      // drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE);
    }
  }
}


It should work for your scenario.