User Storage
userStorage API (Server-Side)
userStorage API (Server-Side)Available Functions
1. this.userStorage.write(name, value, expirationTimestamp)
this.userStorage.write(name, value, expirationTimestamp)Placeholder
Description
Type
Required
Example
async function() {
const href = this.getFrontendVariable('window_location_href');
const url = new URL(href);
const gclid = url.searchParams.get("gclid");
if (gclid) {
const expirationTime = Date.now() + 7890000000;
this.userStorage.write("gclid", gclid, expirationTime);
return gclid;
}
return null;
}2. this.userStorage.read(name)
this.userStorage.read(name)Placeholder
Description
Type
Required
Example
3. this.userStorage.delete(name)
this.userStorage.delete(name)Placeholder
Description
Type
Required
Example
Best Practices
Summary
Last updated
Was this helpful?