Adding a Variable

Modified on Wed, 18 Jun at 4:30 AM

To add a variable, follow the steps below:

  1. From the Left Nav Menu, click Setup > Variables.

  2. On the Variables page, click Add.

  3. In the Create Variable pop-up window, enter the Name of the variable.
  4. From the Data Type drop-down list, select String to accept text input or Number to accept numeric input in the field.

  5. From the Source Type drop-down list, select a source type.

    All parameters listed below help you track the performance of the Experience or Hub they are associated with.
    • Cookie: Select this source type to track a user session or store information that should be remembered about the user, such as preferences or shopping cart details.
    • Hidden Field: Use this to submit data that isn’t entered by the user but is essential for managing user-related information. 
    • JavaScript Variable: Define a JavaScript variable to make it a part of your page source.
    • JavaScript Function: Invoke a custom JavaScript function to generate or fetch data.
    • URL Parameter: Extract data from the URL query string parameters.

      Important: You can define the value of the variable using the Who tab of an Experience or Hubs > Recommendation Rules.

  6. After selecting a Source Type, you’ll be prompted to provide the variable name.
     
  7. Click Create.

  8. The created variable appears in the Variable listing page.


Related Topics:

Editing a Variable

Deleting a Variable

Searching Variables

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article