Page tree

 

Contents

Custom fields in JavaScript are used to send data that may not be available on the page for the visual editor to collect or update fields on events besides page loads.

Sending Data on Page Load

  • The JavaScript must be listed before the beacon, generally after the declaration of userId in your integration.

  • CUSTOM_FIELD_NAME <String>: The name of the field you would like to track.
  • CUSTOM_FIELD_VALUE: The value of the field you would like to track.
    Note: Field Names and values must be strings, booleans, integers or floats.
  • The final argument 'request' can be substituted for 'page'
    • Request: Field is sent to Evergage only on page load.
    • Page: Field is sent with every action taking place on current page, including page load.

    See here for more details regarding JavaScript setup of the Beacon and sending data on page load.

Sending Data On Other Events

  • Fields can be sent at other moments besides page load in a similar fashion, with an extra line of code.

  • CUSTOM_FIELD_NAME <String>: The name of the field you would like to track.
  • CUSTOM_FIELD_VALUE: The value of the field you would like to track.
    Note: Field Names and values must be strings, booleans, integers or floats.
  • The final argument 'request' can be substituted for 'page'
    • request: Field is sent to Evergage only on page load.
    • page: Field is sent with every action taking place on current page, including page load.
  • ACTION_NAME <String>: Action to take place after setting field. Fields are only sent if an action takes place after setting the field.

 

A note about fields: After a field is passed to Evergage for the first time it will not immediately appear as a user or account field. You must visit the 'Fields' section of the Settings within the Evergage app and declare the field as such.

This page has no comments.