On idea:
I'd like more control over how and when data elements are evaluated.
Issue:
You have a data element that accesses an object/property: "page.name[0].length"
If that object or property doesn't exist (or you know it will show up later), JS throws undefined errors as soon as the page loads.
Idea:
If I could say something like "delay initial execution" - and in theory what it would do is only evaluate the DE when it's called upon in a rule, that might help. The rule could be based on a Custom Event or a Direct Call, where I know the object is present
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @J2_2
Yeah this issues is obvious me and my team had experience same many times so at first I'll suggest to add fail safe check for particular object/method and see if that's available in page, if so then only do further steps.
And what @yuhuisg highlighted below that too take into consideration.
Launch evaluates data elements when they are referenced. In your case, you should use your data element with a relevant rule that runs after a suitable "delay initial execution" period.
That means when your Custom Event/Direct Call/other event triggers, then you should assume that your data element will be able to evaluate as expected. If you can't assume that, then you need to delay your Custom Event/Direct Call/other trigger until the data element can evaluate as expected.
Views
Replies
Total Likes
Yeah that's the issue - the Data Elements are evaluated when they are referenced, and they are referenced immediately on page load, when Launch instantiates, which is where errors occur.
This means you load your page, fire a thousand reference errors, and then later, when a rule references the DE, then it works correctly. If you can delay initial execution, you won't have to enclose all your DE's in try{}catch(){} blocks to handle the errors
Views
Replies
Total Likes
Hi @J2_2
Yeah this issues is obvious me and my team had experience same many times so at first I'll suggest to add fail safe check for particular object/method and see if that's available in page, if so then only do further steps.
And what @yuhuisg highlighted below that too take into consideration.
Yeah we do that today for sure
Views
Replies
Total Likes
in that case it's time for Avg. marketer to become tech marketer
Views
Likes
Replies
Views
Likes
Replies