You are here

function google_adwords_rules_action_info in Google AdWords Conversion Tracking 7.2

Same name and namespace in other branches
  1. 8 google_adwords.rules.inc \google_adwords_rules_action_info()
  2. 7 google_adwords.rules.inc \google_adwords_rules_action_info()

Implements hook_rules_action_info().

Use this rule to add google adword conversion tracking on non entity pages.

File

./google_adwords.rules.inc, line 13
Rules integration for google adwords conversion tracking.

Code

function google_adwords_rules_action_info() {
  $actions = array();
  $actions['google_adwords_add_tracking'] = array(
    'label' => t('Set Google Adwords conversion tracking code'),
    'parameter' => array(
      'conversion_id' => array(
        'type' => 'integer',
        'label' => t('Conversion ID'),
        'optional' => FALSE,
      ),
      'label' => array(
        'type' => 'text',
        'label' => t('Label'),
        'optional' => FALSE,
      ),
      'value' => array(
        'type' => 'text',
        'label' => t('Conversion Value'),
        'optional' => TRUE,
        'default value' => 0,
      ),
      'language' => array(
        'type' => 'text',
        'label' => t('Language'),
        'optional' => TRUE,
        'default value' => 'en',
      ),
      'color' => array(
        'type' => 'text',
        'label' => t('Color'),
        'optional' => TRUE,
        'default value' => 'FFFFFF',
      ),
      'format' => array(
        'type' => 'text',
        'label' => t('Format'),
        'optional' => TRUE,
        'default value' => '1',
      ),
      'currency' => array(
        'type' => 'text',
        'label' => t('Format'),
        'optional' => TRUE,
        'default value' => 'EUR',
      ),
    ),
    'group' => t('Google Adwords'),
  );
  return $actions;
}