Skip to main content

Custom Metrics Events

Dispatch a custom event that will appear in the Clicks section of the metrics page.

window.wyng['_WYNG_ID_'].dispatchMetricEvent(payload);

Parameters

dispatchCampaignAction accepts a single paramter, an object containing the following:

KeyTypeDescriptionExample
subtypestring - requiredThe name of your eventRegister button clicked, Purchase
qualifierstringAn optional additional grouping option for the subtypeFooter, Face Cream
quantitynumberAn optional number. e.g. a purchase price100, 24.99

Example

window.wyng['_WYNG_ID_'].dispatchMetricEvent(
{
subtype: 'Register Button Clicked',
}
)

Displaying events

Your custom events will be displayed on the Metrics page of your Wyng Property, under the Clicks card.

The Custom Events data table has 4 columns: Subtype, Qualifier, Count and Quantity.

  • Count will show the number of events with a given Subtype and Qualifier.
  • Quantity sums up the Quantities of all events with the given Subtype and Qualifier.
SubtypeQualifierCountQuantity (sum)
Register button clickedfooter240
Register button clickedheader196
PurchaseFace Cream76987.24
Register button clickedform 253
PurchaseShampoo421270.05