Pushes a custom dimension for a particular user to the VWO server. It is used for post-segmenting the data in the campaign reports.

Description

The API method:

  • Validates the parameters passed
  • Sends a call to the VWO server for associating custom dimensions for the user to the same users that are part of the FullStack campaign.

The API method accepts a custom dimension key - custom_dimension_key, custom dimension value - custom_dimension_value, and user-id - user_id.

custom_dimension_key is the unique key associated with a particular custom dimension made in VWO application.
custom_dimension_value is the value you want to tag a custom dimension with.
userId is the unique id associated with the user for identification.

Parameter Definitions

ParameterTypeDescription
custom_dimension_key
Required
StringThe custom dimension key to uniquely identify a custom dimension.
custom_dimension_value
Required
StringThe custom dimension value for a custom dimension.
user_id
Required
StringUser ID, which uniquely identifies each user.

Important: This User ID must match the User ID provided to activate or getVariation API.

Returns

A boolean value based on whether the call was made to the VWO server.

ValueTypeDescription
trueBooleanIf call is successfully being made to the VWO server for post-segmentation
falseBooleanIf validation fails or call is not made

Usage

vwo_client_instance.push(custom_dimension_key, custom_dimension_value, user_id)

Tracking Multiple Custom Dimensions simultaneously

There would be instances when you would like to push more than one custom dimension associated with a particular user. To solve this, you can refer to the below docs and make sure you're using the latest SDK.

ParameterTypeDescription
custom_dimension_map
Required
DictionaryA map to provide different custom dimensions associated with the user in form of key-value pairs.
user_id
Required
StringUser ID, which uniquely identifies each user.

Important: This User ID must match the User ID provided to activate or isFeatureEnabled API

Usage

custom_dimension_map = {
  "tag_key_1": "tag_value_1",
  "tag_key_2": "tag_value_2",
  "tag_key_3": "tag_value_3"
}

# positional parameters
vwo_client_instance.push({"tag_key_1": "tag_value_1"}, "user_id")

# using named parameters/kwargs
vwo_client_instance.push(custom_dimension_map = custom_dimension_map, user_id = user_id)

📘

Note

This will make multiple tracking calls to the VWO server corresponding to each key-value pair.