I've lookup into your problem. There are a few problems. To start with, your newTrackingId variable is scoped to your setCustomTask function only and therefore not available at the moment that the GA object if executing your customTask. You need to scope them to a Window variable: window['newTrackingId']
The next problem is that the default Universal Analytics template does not allow you to set values in the GA object which are a function. Here what happens in the tag template:
In the first image, you see that all the values in u.data.set are inserted into a function utag.loader.GV(). That one does not allow function as a input type (see the second image). In the third image you can see that the function customTask is indeed defined in u.data.set. In the fourth image, you see a possible solution, you can change this in the UA tag template. In my case it works fine.
I don't know why Tealium build in this function protection, maybe someone else know? This
... View more