# Matomo.RecordHit: Matomo Matomo tracking actions Matomo.RecordHit: Matomo Matomo tracking actions Record a tracking hit or conversion. Documentation Records one hit through Matomo's Tracking API (matomo.php) from a source other than the tracked website's own browser or app - a backend order, an imported conversion, a phone sale. id_site is required; every other parameter is optional. Ecommerce order detail (ec_id/ec_items) and custom dimensions are not yet supported by this procedure - see design chapter 20a.Parameters of Procedure The following parameters can be used to control the behaviour of the procedure `Matomo.RecordHit`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `id_site` | `int32` | ☑ | | Matomo site ID the hit is recorded on. | | `url` | `string` | ☐ | | URL of the page or resource the hit is attributed to. | | `action_name` | `string` | ☐ | | Name of the action, shown in Matomo's reports in place of a page title. | | `visitor_id` | `string` | ☐ | | 16-character hexadecimal visitor ID to attribute the hit to an existing visitor. A new visitor is created when omitted. | | `id_goal` | `int32` | ☐ | | ID of the goal to convert. | | `revenue` | `double` | ☐ | | Revenue of the goal conversion. | | `event_category` | `string` | ☐ | | Category of the event to record. | | `event_action` | `string` | ☐ | | Action of the event to record. | | `event_name` | `string` | ☐ | | Name of the event to record. | | `event_value` | `double` | ☐ | | Numeric value of the event to record. | | `custom_date_utc` | `datetime` | ☐ | | Date and time (UTC) to record the hit under, instead of now. |