CampaignEvent

A CampaignEvent is a record of activity generated by a campaign, such as a page visit, an offer purchase, or cash redemption. The Campaign API Calls provide a way to download the events for analysis. CampaignEvents have the following attributes.

Attributes

id
String; always provided. Event IDs have no guaranteed order, so applications that use event IDs must treat them as opaque.
type

String; always provided. Possible values include:

  • visit: Someone visited the offer.
  • visit_get: Someone clicked the offer’s “get” button.
  • accept: Someone accepted the offer. This event will be followed by either a receive or cancel event depending on whether the offer payment completes and the person accepts the cash.
  • receive: The payment (if any) completed and the purchaser received the cash.
  • cancel: The offer acceptance was canceled, usually due to expiration of the confirmation email.
  • redeem: Someone redeemed the cash.
  • non_redeem: Someone transferred the cash without redeeming it.
  • expire: The cash expired and was returned to the provider.
  • return: The cash was returned to the provider for a reason other than expiration. For example, the holder may have returned the cash manually.
timestamp
String; always provided. Contains the UTC ISO 8601 date/time of the event.
offer_id
String; always provided. The ID of the offer involved in the event.
offer_url
String; always provided. The offer URL accessed by the user at the time the offer was visited or accepted.
output_num
Integer; always provided. If an offer is configured to generate events for multiple campaigns, each event can appear more than once in a list of events (sometimes with different campaign_id and channel attributes). The output_num attribute distinguishes copies of events.
campaign_id
String; always provided. The campaign ID assigned to the offer URL at the time the offer was visited or accepted. Always provided.
channel
String; may be empty. The name of the channel assigned to the offer URL at the time the offer was visited or accepted.
profile_id
String; may be empty. Empty if not known or not available. The profile ID of the person or business who visited the offer, accepted the offer, redeemed cash, or sent non-redeemed cash.
recipient_id
String; may be empty. The ID of the profile who received the cash. Provided only for redeem, non_redeem, expire, and return events.
merchant_id
String; always provided. Specifies the offer merchant.
distributor_id
String; always provided. Specifies the offer distributor.
referrer_id
String; may be empty. The ID of the profile who shared the offer with the purchaser.
accept_transfer_id
String; may be empty. The transfer ID of the original accept event. Provided for all events except visit and visit_get events.
accept_timestamp
String; may be empty. Contains the UTC ISO 8601 date/time when the cash was originally accepted. This attribute is provided for all events except visit and visit_get. Use this to measure how long the cash circulated before other events like redemption.
transfer_id
String; may be empty. Identifies the transfer that created this event. Provided for all events except visit and visit_get events. The transfer_id is the same as accept_transfer_id except in the case of redeem, non_redeem, and return events.
quantity
Integer or null. The quantity of units purchased or accepted. Provided only for accept, receive, and cancel events.
amounts

An object that contains all amounts related to this event. Each attribute is LoopAmountMap object, which maps each loop_id (either a closed-loop design ID or 0 (zero) for open-loop cash) to an object that maps each currency to an amount. Some example LoopAmountMaps are:

{"123456789": {"USD": "12.99"}}
{"0": {"USD": "12.99"}}
{"0": {"MXN": "1.00", "USD": "2.00"}}

The amounts object contains some of the following LoopAmountMap attributes:

  • paid: describes what by the purchaser paid. Provided only for receive events. The paid amount map is empty for free, merchant-funded, and distributor-funded offers.
  • received: describes the cash received by the purchaser. Provided only for receive events.
  • redeemed: describes the cash redeemed, but includes only the cash provided by the transfer identified by the accept_transfer_id event attribute. This is provided only for redeem events.
  • all_redeemed: describes the cash redeemed. Unlike the redeemed amount, this includes cash that was provided through any transfer. When all the redeemed cash originated from a single offer purchase, the all_redeemed amount map is the same as the redeemed amount map. When some of the redeemed cash originated from different offer purchases or direct send operations, the all_redeemed amount will be greater than the redeemed amount. This amount map is provided only for redeem events.
  • total_due: describes the sale amount as recorded by WingCash, including the sales tax. (WingCash tries to collect the sale amount, but that information is not always available.) This is provided only for redeem events. Tools that use this information should be careful to avoid counting purchases more than once, since a purchase can generate multiple redeem events attributable to different offers and campaigns. Use the ratio of the redeemed amount to the all_redeemed amount to avoid counting purchases more than once.
  • total_tax: describes the sales tax as recorded by WingCash. This is provided only for redeem events, and only when the tax is provided by a point of sale system.
  • non_redeemed: describes what was sent but not redeemed. Provided only for non_redeem events.
  • expired: describes the cash expired. Provided only for expire events.
  • returned: describes the cash returned. Provided only for return events.
loop_ids
A list of strings that identifies the cash designs involved in the event. If the campaign is configured to filter by cash design, each event will only be added to the campaign if the filter matches.
visitor_cookie
String; may be empty. Contains the value of a random long-lived cookie that distinguishes the visitor. Provided only for visit, visit_get, and accept events. Use this attribute to group visit, visit_get, and accept events for a reasonably correct count of visitors.
visit_cookie
String; may be empty. Contains the value of a random short-lived cookie (1 hour duration) that distinguishes the visit. Provided only for visit, visit_get, and accept events. Use this attribute to group visit, visit_get, and accept events for a reasonably correct count of visits.
privileged
Boolean; always provided. True if the viewer or purchaser has any special permissions on the offer such as the right to edit or manage. Use this when you want to filter events from offer editors and managers.