Usage
nebula.crm(action, data, callback)
Parameters
action
(Required) (String) What will be done with the data
Default: None
data
(Required) (Object) The data to store
Default: None
sendNow
(Optional) (Boolean) Send a virtual pageview to work with Hubspot Free CRM
Default: true
Parameter Notes
Action can be “identify” or “event”.
Data is stored as an object of {property: value}
.
Examples
Send multiple columns of data in the same function
nebula.crm('identify', { favorite_color: 'green', favorite_nfl_team: 'Philadelphia Eagles' });
Send multiple columns of data in the same function call (using core Hubspot API, for reference). This particular example would be embedded in a PHP script.
_hsq.push(["identify", { ipaddress: '<?php echo $_SERVER['REMOTE_ADDR']; ?>', user_agent: '<?php echo $_SERVER['HTTP_USER_AGENT']; ?>', session_id: '<?php echo nebula()->nebula_session_id(); ?>', }]);
Additional Notes
This function requires the Hubspot Portal ID in Nebula Options.
Source File
This function was not found in /assets/js/modules/analytics.js. Please report this error.
No Hooks
This function does not have any filters or actions available. Request one?Override
To override or disable this JavaScript function, simply redeclare it with the exact same function name. Remember: Some functionality is conditionally loaded via dynamic imports, so if your function is not overriding properly, try listening for a DOM event (described below).
function crm(action, data, sendNow){ //Write your own code here, leave it blank, or return false. }