Peacemaker.Analytics (Peacemaker v3.3.5-rc.7) View Source

This module composes functions from the Segment implementation to shorthand some common events we want to record, like when an order is purchased or refunded.

From an overview, the module hierachy looks like:

[Peacemaker.Analytics]

       |

[Segment.Spec.Order]

       |
                                                 [Segment.Spec.Product]
        /
      /
    /
    |

[Segment.Tracker]

Link to this section Summary

Functions

Sends an purchase event to Segment

Sends an refund event to Segment

Link to this section Types

Link to this type

limelight_postback_request()

View Source

Specs

limelight_postback_request() :: %{
  campaign_id: String.t(),
  email: String.t(),
  order_id: String.t(),
  order_total: String.t(),
  product_skus_csv: String.t(),
  post_back_action: String.t(),
  is_test_cc: String.t()
}

Link to this section Functions

Link to this function

account_goals_updated(conn, payload, map)

View Source
Link to this function

create_context_from_conn(conn, request_params)

View Source
Link to this function

customer_created(conn, payload, map)

View Source
Link to this function

record_booked_appointment(conn, payload, map)

View Source
Link to this function

record_live_class_attend(conn, payload, map)

View Source
Link to this function

record_new_cancel_subscription(conn, order_token, arg3)

View Source
Link to this function

record_new_class_view(conn, payload, map)

View Source
Link to this function

record_new_in_app_trial(conn, order_token, arg3)

View Source
Link to this function

record_new_lead(conn, prospect_token, map)

View Source
Link to this function

record_new_live_webinar_attendee(conn, order_payload, map)

View Source
Link to this function

record_new_membership(conn, payload, map)

View Source
Link to this function

record_new_on_hold_subscription(conn, order_token, arg3)

View Source
Link to this function

record_new_referral_accepted(conn, order_token, map)

View Source
Link to this function

record_new_referral_sent(conn, order_token, map)

View Source
Link to this function

record_new_replay_webinar_attendee(conn, order_payload, map)

View Source
Link to this function

record_new_sale(conn, order_token, arg3)

View Source
Link to this function

record_new_sale(conn, order_token, arg3, arg4)

View Source
Link to this function

record_new_trial(conn, order_token, arg3)

View Source
Link to this function

record_new_trial(conn, order_token, arg3, arg4)

View Source
Link to this function

record_new_webinar_registrant(conn, token, map)

View Source
Link to this function

record_prospect_created(conn, prospect_token, map)

View Source
Link to this function

record_purchase(limelight_webhook_request)

View Source

Specs

record_purchase(limelight_postback_request()) :: atom()

Sends an purchase event to Segment

Link to this function

record_purchase(limelight_webhook_request, context)

View Source
Link to this function

record_purchase(conn, arg2, context, properties)

View Source
Link to this function

record_refund(limelight_webhook_request)

View Source

Specs

record_refund(limelight_postback_request()) :: atom()

Sends an refund event to Segment

Link to this function

record_webinar_open_email_confirmation(conn, payload, map)

View Source
Link to this function

registered_for_live_class(conn, payload, map)

View Source
Link to this function

saw_cta(conn, payload, map)

View Source
Link to this function

set_first_password(conn, payload, map)

View Source
Link to this function

update_user_type(conn, tracking_id, current_user_type, proposed_user_type)

View Source