I am using module Mixpanel in my site. And I want to override function of this module. Here is link where we can see the function or code which I need to alter CODE NEED TO MODIFIED
Below is the code line which suggest that I can override this function :
// Let other modules alter the defaults.
drupal_alter('mixpanel_defaults', $properties, $account);
So from above line I am trying to override it with code as below, please let me know what I am doing wrong as it does not make any changes. However if I do same thing in main module it make changes but I don't want to make change in module but want to do in my custom module.
My custom module name: custom
function custom_mixpanel_defaults_alter($properties, $account) {
$properties['distinct_id'] = $account->name;
}
When i see in system
table weight of my custom module
is 1000
and weight of Mixpanel
is 0
.
Please suggest! Thanks
&$properties
instead of just$properties
, and&$account
in place of$account
.