Class: OursprivacyIngest::Models::ExperimentAssignmentParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/oursprivacy_ingest/models/experiment_assignment_params.rb

Overview

Defined Under Namespace

Classes: Context

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from OursprivacyIngest::Internal::Type::BaseModel

Instance Attribute Details

#contextOursprivacyIngest::Models::ExperimentAssignmentParams::Context?

Optional page context for URL + query-param eligibility. Variant bucketing is deterministic on ‘visitor_id` regardless of context.



37
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 37

optional :context, -> { OursprivacyIngest::ExperimentAssignmentParams::Context }, nil?: true

#experiment_keyString

The experiment’s stable key. Surfaced in the dashboard under each experiment’s setup tab.

Returns:

  • (String)


15
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 15

required :experiment_key, String

#tokenString

The experiment token (‘exp_*`) for the experiment settings holding this experiment. Available from the dashboard.

Returns:

  • (String)


22
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 22

required :token, String

#track_impressionBoolean?

When true (default), an ‘$experiment_impression` event is enqueued and the visitor’s ‘experiment_assignments` map is updated. Set to false to read the assignment without recording an impression — useful for in-test diagnostics.

Returns:

  • (Boolean, nil)


45
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 45

optional :track_impression, OursprivacyIngest::Internal::Type::Boolean, nil?: true

#visitor_idString

Stable identifier for the visitor — typically the Ours visitor id from your browser cookie, or your own server-side user id if you keep the same id consistent across browser and server.

Returns:

  • (String)


30
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 30

required :visitor_id, String