## Overview

Promotion events help you gather analytics on offers within your eCommerce website. Our enhanced analytics automatically track promotional information displayed by Affirm without any additional integrations.

## trackPromotionViewed([Promotion](🔗))

This event is triggered when a customer views a promotion.

#### Parameters

ParameterData typeDescription
`promotion` <span style="color:red">required</span>_object_The promotion the customer viewed.

#### Example





## trackPromotionClicked ([Promotion](🔗))

This event is triggered when a customer clicks on a promotion.

#### Parameters

ParameterData typeDescription
`promotion` <span style="color:red">required</span>_object_The promotion the customer clicked.

#### Example



## Objects

### Promotion

Represents a promotion present on the eCommerce website, with or without creatives. Functions using a promotion to support multiple products to be associated with the promotion.

ParameterData typeDescription
`creativeId` _optional__string_ **Maximum length**: 500 **Protocol parameter**: `pmmc`An identifier for the creative used by the promotion.
`message` _optional__string_ **Maximum length**: 500 **Protocol parameter**: `pmms`The messaging used in the promotion.
`position` _optional__string_ **Maximum length**: 500 **Protocol parameter**: `pmpo`An identifier indicating where within the website the customer viewed the promotion (e.g., top_home).
\*_promotionId_ _optional__string_ **Maximum length**: 500 **Protocol parameter**: `pmpi`A unique identifier of the promotion the customer viewed.