CVS edit link for al.ex

The Omniture Node module extends the existing Omniture Integration ("omniture") module. It adds the functionality to store Omniture/SiteCatalyst parameters for individual nodes, whereas the Omniture Integration module only defines site-wide parameters.

This integration is achieved thru an implementation of hook_omniture_variables().

"Link profiles" are an additional feature of this module. A link profile is a named set of specific Omniture parameters stored with a node. The basic purpose is to track clicks via Omnniture to a destination node that has a link profile set.

Using the omniture_node_l() function, a link to a node with a link profile can be created. This link will automatically create the SiteCatalyst JavaScript required to track link clicks in the browser.

I intend to release this module as dev version first. It's already under production at http://jaspersoft.com (the main sponsor) though.

-Alex

CommentFileSizeAuthor
#4 omniture_node.zip9.02 KBal.ex
#1 omniture_node.zip15.17 KBal.ex

Comments

al.ex’s picture

StatusFileSize
new15.17 KB
al.ex’s picture

Status: Postponed (maintainer needs more info) » Needs review
avpaderno’s picture

Status: Needs review » Needs work
  1.           '#title' => t('Profile #'. $index),
    

    Use a placeholder.

  2.     switch ($op) {
          case 'load':
    
            // Extend the node with Omniture parameters if the node holds any
            $omniture = omniture_node_load($node);
            if (count($omniture) > 0) {
              $fields['omniture'] = $node->omniture = $omniture;
              return $fields;
            }
            break;
    

    The code should just return an array containing values that needs to be added to the node object, not add the fields directly to the object.

  3. function _get_omniture_node_parameter_schema($name = 'node') {
      require('include/omniture_node.schema.inc');
      return $$name;
    }
    

    The function should use module_load_include(), but then it is not necessary to use a separate file that is used only from the module.

  4. The license file should be removed; it is not possible to commit it in CVS.
al.ex’s picture

StatusFileSize
new9.02 KB

Thanks KiamLaLuno.

1, 2, 4 √

on 3):

I refactored the code a bit, moved the schema arrays into a function.
The schema file gets loaded now with module_load_include() at hook_init().

The reason why I want to keep the schema in its own file for now is that the user should be able to modify/replace the schema isolated from the main module file. The file would still get overwritten during an update obviously if the user isn't careful. Ultimately, I want the schema to be stored in the database and not in a file. For now it works and was cheap.

-Alex

al.ex’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Fixed

Take in mind that hook_init() is not called for cached pages; depending on the case, this could be a problem.

al.ex’s picture

Thanks KiamLaLuno for your fast processing. I will take your warning into account.

-Alex

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Component: Miscellaneous » new project application
Assigned: Unassigned » avpaderno
Issue summary: View changes
Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.