BranchTrack Total Score
February 1, 2018 12:00 AM
Has anyone figured out how to get the total score of the BranchTrack scenario using variables in Lectora? The built in variable only tells the score of the particular scene (+10, +20, etc). I want to force the user to score at least a total of 75 points. I just can't get Lectora to capture that total amount at the end. Any ideas?
Discussion (1)
Hi! I had the same issue and it turned out that Lectora wasn't properly reading the BT score. The folks at branch track had me do the following:
We have a fix for the +score issue:
1) Create a variable BT_Score_Fix
2) Create action On Page Show - Run Javascript - paste the following code:
// make Lectora listen for BranchTrack events
window.parent.addEventListener(‘message’, function(message) {
data = JSON.parse(message.data);
VarBT_Score_Fix.set(data.details.playlog.score);
});
Now the “BT_Score_Fix” variable will always contain the correct amount of points (when also subtracting) and the +points (score) will be actionable.
undefined
This fix worked in IE and Chrome up until January. I believe the last two lectora updates have caused this to stop working again when I republished. I was hoping lectora 17.1.2 would fix the issue, but it didn't. I have a ticket in with BranchTrack and Trivantis.
Discussions have been disabled for this post