RTP 'get' value from userContext

Domenic_Schiera
Level 1

RTP 'get' value from userContext

Hello!

I am following this documentation: https://developers.marketo.com/javascript-api/web-personalization/user-context/

, and I see that there is a way to set variables in the userContext, but there is no documentation on how to read the value.

You can set the value with

rtp('set', 'customVar1', 'foo');

I assume that you can read the value with

var customVar1 = rtp('get', 'customVar1');

Is that correct?

I could test this out, but I have not enabled  the User Context API yet.