You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently saw a case where a Google Analytics user failed to correctly send their account id.
From reading the code, this is currently a silent failure which is very hard to debug.
I think we should introduce a concept of required vars where a trigger fails with a clear error message in the dev tools console if a variable that is absolutely required was not set.
Could this just be a vendor config feature? I don't think it makes sense in any other context because there's not an expectation of inherited behavior.
1 Have a new array in the config that lists all the required variables and then Ensure that none of those are empty(-ish) when final url creation is being done.
2 Create a variable called REQUIRED in url-replacements and set the default value for all required variables to REQUIRED. Whenever we try to expand this variable, we'll throw a user error and say that this is required.
Both of them are easy enough to do. 1. is contained within mp-analytics package whereas 2 results in code changes in platform. 2 might be slightly simpler to read/understand.
Given we've already supported all the operator macros. We can also introduce a REQUIRED macro for this use case. However the error message itself won't be very specific because it can't relate to the original variable name.
I would vote for approach #1 instead, where we can introduce a requestedVars field;
requiredVars: ['fake']
The con is that no error will occur if ${fake} resolve to empty. But I don't expect that to be common.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
I recently saw a case where a Google Analytics user failed to correctly send their account id.
From reading the code, this is currently a silent failure which is very hard to debug.
I think we should introduce a concept of required vars where a trigger fails with a clear error message in the dev tools console if a variable that is absolutely required was not set.
CC @rudygalfi @avimehta
The text was updated successfully, but these errors were encountered: