• Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    Parameters

    Returns void

    Throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    Example

    // Send an event to Pinpoint
    record({ name: eventName })

    Example

    // Send an event to Pinpoint with metrics & custom attributes
    record({
    name: eventName,
    attributes: {
    'my-attribute': attributeValue
    },
    metrics: {
    'my-metric': metricValue
    }
    })