Overwriting Metadata question
Hey there, I have a question related to how metadata is being overwritten:
Let's consider the scenario where in the account information, I'm receiving a field called "countNumber," and its value is only accessible with certain permissions.
Initially, one visitor (Y) within Account X is registered with a "countNumber" value of 5. Later, another visitor (Z) within Account X is registered, but doesn't have permissions to access the "countNumber" value, resulting in an empty string.
In this situation, the account metadata on Pendo will display that the "countNumber" value for Account X is an empty string.
My question is whether there's a way to prevent overwriting the "countNumber" field provided for visitor Y with the metadata from visitor Z, considering it's empty. This way, the account information can still show "countNumber" as 5 instead of an empty string.
Thanks!
Comments
Great question, I'm not sure there is unless you update your snippet to look somehow at the user permissions and "if they don't have access, don't pass a new value for the account metadata"?
Exactly, I solved it like that. Check for the permissions first, then if the user don't have it, that field is not being sent at all, in that way the previous value won't be overwritten.
Please sign in to leave a comment.