Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/Multichannel/CLM/CreatingContent/CreateHTML/TrackActivityJS.htm

## Tracking User Activity Using JavaScript

* Object Model

To support analysis of detailed user activity within CLM content, content can be coded to capture specific user actions performed on HTML5 content using the [updateRecord](https://developer.veevacrm.com/doc/Content/CRM_topics/Vault/clm-vault.htm#updateRecordobjectrecordvaluescallback) JavaScript function. These actions can include button selections or certain gestures (clickstream data), or generic data capture, such as updating an HCP’s email address on the account object. See the [CLM JavaScript library](https://developer.veevacrm.com/doc/Content/CRM_topics/Vault/clm-vault.htm) for more information on the available functions.

**Who can use this feature?**

* Content Creator Users - Browser
* [Create content with user activity tracking](#Creating)
* End Users - CRM Desktop (Windows), iPad, iPhone, Windows
* Users do not require an additional license

### Configuring User Activity Tracking

[![Closed](../../../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

If saving tracked data into a custom object, configure the following for end users:

1. Ensure [Configuring CLM as Object Model](../../ConfiguringCLM/CLMBasicConfig.htm) is complete.
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate permission set.
4. Select the **Objects** tab.
5. Grant **CRE** object permissions to the custom object for the appropriate object types.
6. Grant **Edit** field permissions to the fields on the custom object where data is saved.

To display the call clickstream information captured on the call report, place the **clickstream\_section\_\_v** app section on the call2\_\_v layouts for the appropriate object types. This section displays a table of responses. The following fields from the call\_clickstream\_\_v object display in the table:

* answer\_\_v
* key\_message\_name\_\_v
* presentation\_id\_\_v
* product\_\_v
* track\_element\_description\_\_v

The fields displayed in the table are not configurable.

### Creating Content with User Activity Tracking

[![Closed](../../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Content Creator Users](#)

Clickstream data can be used to capture custom information. By building a custom control within HTML5 content, responses can be captured and later displayed directly on the call report.

Do not use the createRecord function to create call2\_key\_message\_\_v records. Doing so interferes with Veeva-defined logic for call key messages.

Additionally, the following fields on the call\_clickstream\_\_v object are automatically populated each time a record is created for a call. Manually entered values for the following fields are overwritten:

* call\_\_v - set to the current call record ID
* product\_\_v - product\_\_v of the corresponding key message record
* key\_message\_\_v - record ID of the corresponding key message record
* clm\_id\_\_v - clm\_id\_\_v of the corresponding key message record
* presentation\_id\_\_v - presentation ID of the CLM presentation record

When implementing clickstream capture, content creators must be mindful of the potential amount of data captured as a part of each slide and/or presentation. Creating a large number of records on each slide increases sync times for users and cause performance degradation on online reports.

### Related Topics

[Creating and Updating Records from CLM](CreateUpdate.htm)

[Creating Interactive HTML Content](../CreateInteractiveHTML.htm)

[Creating Dynamic Content](DynamicContent.htm)
