How to access account constants inside code blocks
What is the Problem?
The problem we are addressing is the need to access account variables within a code block. This can be challenging when trying to retrieve specific information related to the account.
What is the Solution?
To access account constants within a code block, follow these steps:
Utilize the Window Object: To access account variables, make use of the
window
object in JavaScript.Use the Appropriate Path: Once you have the
window
object, navigate through the following path:window.jentis.config.jtm.accountconstants['Tealium_Data_Enrichment-tealium_account']
. Within the brackets, you can access any account constant you are using. You can find all of them by callingwindow.jentis.config.jtm.accountconstants
from the console:Retrieve the Desired Information: By following the given path, you will be able to retrieve the required account constants for further use within the code block.
Summary
In summary, accessing account variables within code blocks can be achieved using the window
object and the appropriate path to the desired account constants. By implementing this best practice, you can seamlessly retrieve and utilize the necessary information related to the account.
If you have any additional questions or need further assistance, please feel free to reach out to our customer support team. We are always here to help!