Implements

  • ICampaignDecisionService

Constructors

Methods

  • Validates the User ID and generates Variation into which the User is bucketed in.

    Parameters

    • userId: any

      the unique ID assigned to User

    • accountId: any
    • campaign: CampaignModel

      the Campaign of which User is a part of

    Returns VariationModel

    variation data into which user is bucketed in or null if not

  • Returns the Variation by checking the Start and End Bucket Allocations of each Variation

    Parameters

    • variations: VariationModel[]
    • bucketValue: number

      the bucket Value of the user

    Returns VariationModel

    variation data allotted to the user or null if not

  • Calculate if this user should become part of the campaign or not

    Parameters

    • userId: any

      the unique ID assigned to a user

    • campaign: CampaignModel

      fot getting the value of traffic allotted to the campaign

    Returns boolean

    if User is a part of Campaign or not