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 - customDimensionKey, custom dimension value - customDimensionValue, and user-id - userId.

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

Parameter Definitions

Parameter

Type

Description

customDimensionKey
Required

String

The custom dimension key to uniquely identify a custom dimension.

customDimensionValue
Required

String

The custom dimension value for a custom dimension.

userId
Required

String

User ID, which uniquely identifies each user.

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

Returns

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

Value

Type

Description

true

Boolean

If call is successfully being made to the VWO server for post-segmentation

false

Boolean

If validation fails or call is not made

Usage

boolean isSuccessful = vwoClientInstance.push(customDimensionKey, customDimensionValue, userId);

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.

Parameter

Type

Description

customDimensionMap
Required

HashMap

A map to provide different custom dimensions associated with the user in form of key-value pairs.

userId
Required

String

User ID, which uniquely identifies each user.

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

Usage

Map<String, Object> customDimensionMap = new HashMap<String, Object>() {
  {
    put("browser", "chrome");
    put("price", "20");
  }
};
vwoClientInstance.push(customDimensionMap, userId);`

📘

Note

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


Did this page help you?