View source
<?php
function commerce_google_analytics_rules_action_info() {
return array(
'commerce_google_analytics_send_order' => array(
'label' => t('Send order to google analytics'),
'group' => t('Commerce Google Analytics'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Order in checkout'),
),
'method' => array(
'type' => 'text',
'label' => t('Method'),
'description' => t("Select ga_push method. Server-side methods are recommended"),
'options list' => 'ga_push_get_methods_option_list_ecommerce',
'default value' => GA_PUSH_METHOD_DEFAULT,
'optional' => FALSE,
),
),
'callback' => array(
'execute' => 'commerce_google_analytics_send_order',
),
),
'commerce_google_analytics_save_ga_session_to_order' => array(
'label' => t('Save google analytics session to order'),
'group' => t('Commerce Google Analytics'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Order to Update'),
),
),
'callback' => array(
'execute' => 'commerce_google_analytics_save_ga_session_to_order',
),
),
'commerce_google_analytics_save_ga_ua_to_order' => array(
'label' => t('Save google analytics user agent to order'),
'group' => t('Commerce Google Analytics'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Order to Update'),
),
),
'callback' => array(
'execute' => 'commerce_google_analytics_save_ga_ua_to_order',
),
),
'commerce_google_analytics_save_ga_uip_to_order' => array(
'label' => t('Save google analytics user ip to order'),
'group' => t('Commerce Google Analytics'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Order to Update'),
),
),
'callback' => array(
'execute' => 'commerce_google_analytics_save_ga_uip_to_order',
),
),
);
}