Class: Optimizely::ImpressionEvent

Inherits:
UserEvent
  • Object
show all
Defined in:
lib/optimizely/event/entity/impression_event.rb

Instance Attribute Summary collapse

Attributes inherited from UserEvent

#event_context, #timestamp, #uuid

Instance Method Summary collapse

Constructor Details

#initialize(event_context:, user_id:, experiment_layer_id:, experiment_id:, variation_id:, metadata:, visitor_attributes:, bot_filtering:) ⇒ ImpressionEvent

Returns a new instance of ImpressionEvent.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/optimizely/event/entity/impression_event.rb', line 25

def initialize(
  event_context:,
  user_id:,
  experiment_layer_id:,
  experiment_id:,
  variation_id:,
  metadata:,
  visitor_attributes:,
  bot_filtering:
)
  super()
  @event_context = event_context
  @uuid = SecureRandom.uuid
  @timestamp = Helpers::DateTimeUtils.create_timestamp
  @user_id = user_id
  @experiment_layer_id = experiment_layer_id
  @experiment_id = experiment_id
  @variation_id = variation_id
  @metadata = 
  @visitor_attributes = visitor_attributes
  @bot_filtering = bot_filtering
end

Instance Attribute Details

#bot_filteringObject (readonly)

Returns the value of attribute bot_filtering.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def bot_filtering
  @bot_filtering
end

#experiment_idObject (readonly)

Returns the value of attribute experiment_id.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def experiment_id
  @experiment_id
end

#experiment_layer_idObject (readonly)

Returns the value of attribute experiment_layer_id.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def experiment_layer_id
  @experiment_layer_id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def 
  @metadata
end

#user_idObject (readonly)

Returns the value of attribute user_id.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def user_id
  @user_id
end

#variation_idObject (readonly)

Returns the value of attribute variation_id.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def variation_id
  @variation_id
end

#visitor_attributesObject (readonly)

Returns the value of attribute visitor_attributes.



22
23
24
# File 'lib/optimizely/event/entity/impression_event.rb', line 22

def visitor_attributes
  @visitor_attributes
end