Clear History

Track Internal Promotion Events

Internal promotion events are used for tracking views and interactions with internal promotion content on your e-commerce store. Such content can be:

  • Hero banners/sliders on the home screen, category screen etc.
  • Sale specific banners e.g. seasonal sales, bundle discounts, free shipping.
  • Category promotion on standard layout slots.

Internal promotion banner


Internal promotion view event

In this section, we will showcase how to track promotion views.

PromotionViewEvent

To track a promotion view you can use the PromotionViewEvent with the following attributes:

PromotionViewEvent(promotion: PromotionEntity)
  • Where promotion is the description of the promotion currently being viewed.

Example usage:

/* Carousel slide 1 viewed */
let promotion1 = PromotionEntity(
    id: "IP1234",
    name: "promo_winter",
    type: "carousel",
    position: 1,
    productIds: ["P1234"]
)
tracker.track(PromotionViewEvent(promotion: promotion1))

/* On carousel slide 2 view */
let promotion2 = PromotionEntity(
    id: "IP1234",
    name: "promo_winter",
    type: "carousel",
    position: 2,
    productIds: ["P1235"]
)
tracker.track(PromotionViewEvent(promotion: promotion2))

PromotionViewEvent

To track a promotion view you can use the PromotionViewEvent with the following attributes:

PromotionViewEvent(promotion: PromotionEntity)
  • Where promotion is the description of the promotion currently being viewed.

Example usage:

/* Carousel slide 1 viewed */
val promotion1 = PromotionEntity(
    id = "IP1234",
    name = "promo_winter",
    type = "carousel",
    position = 1,
    productIds = listOf("P1234")
)
tracker.track(PromotionViewEvent(promotion1))

/* On carousel slide 2 view */
val promotion2 = PromotionEntity(
    id = "IP1234",
    name = "promo_winter",
    type = "carousel",
    position = 2,
    productIds = listOf("P1235")
)
tracker.track(PromotionViewEvent(promotion2))

PromotionViewEvent

To track a promotion view you can use the PromotionViewEvent with the following attributes:

PromotionViewEvent(promotion: PromotionEntity)
  • Where promotion is the description of the promotion currently being viewed.

Example usage:

/* Carousel slide 1 viewed */
PromotionEntity promotion1 = new PromotionEntity(
    "IP1234", // id
    "promo_winter", // name
    Arrays.asList("P1234"), // productIds
    1, // position
    null, // creativeId
    "carousel" // type
)
tracker.track(new PromotionViewEvent(promotion1))

/* On carousel slide 2 view */
PromotionEntity promotion2 = new PromotionEntity(
    "IP1234", // id
    "promo_winter", // name
    Arrays.asList("P1235"), // productIds
    2, // position
    null, // creativeId
    "carousel" // type
)
tracker.track(new PromotionViewEvent(promotion2))

Internal promotion click event

In this section, we will showcase how to track a click/selection of an internal promotion.

PromotionClickEvent

To track a click/selection of an internal promotion you can use the PromotionClickEvent with the following attributes:

PromotionClickEvent(promotion: PromotionEntity);
  • Where promotion is the description of the promotion clicked/selected.

Example usage:

let promotion = PromotionEntity(
    id: "IP1234",
    name: "promo_winter",
    type: "carousel",
    position: 1,
    productIds: ["P1234"]
)

tracker.track(PromotionViewEvent(promotion: promotion))

PromotionClickEvent

To track a click/selection of an internal promotion you can use the PromotionClickEvent with the following attributes:

PromotionClickEvent(promotion: PromotionEntity);
  • Where promotion is the description of the promotion clicked/selected.

Example usage:

val promotion = PromotionEntity(
    id = "IP1234",
    name = "promo_winter",
    type = "carousel",
    position = 1,
    productIds = listOf("P1234")
)

tracker.track(PromotionViewEvent(promotion))

PromotionClickEvent

To track a click/selection of an internal promotion you can use the PromotionClickEvent with the following attributes:

PromotionClickEvent(promotion: PromotionEntity);
  • Where promotion is the description of the promotion clicked/selected.

Example usage:

PromotionEntity promotion = new PromotionEntity(
    "IP1234", // id
    "promo_winter", // name
    Arrays.asList("P1234"), // productIds
    1, // position
    null, // creativeId
    "carousel" // type
)
tracker.track(new PromotionViewEvent(promotion))

Where PromotionEntity can have the following attributes:

attributetypedescriptionrequired
idstringID of the promotion.
namestringFriendly name for the promotion.
productIdsstring[]Array of SKUs or product IDs showcased in the promotion.
positionnumberposition the promotion was presented in a list of promotions E.g. in a slider.
creativeIdstringIdentifier/Name/Url for the creative presented on the promotion.
typestringType of the promotion delivery mechanism. E.g. popup, banner, intra-content.
slotstringThe website slot in which the promotional content was added to. E.g. Identifier for slot sidebar-1, intra-content-2.