One of the biggest tips I ever came across was when to have a gel, bar or drink.
They have made it pretty simple since really you want to be focusing on other things then what when and how to have them.
Simple rule of thumb: 2-3 units an hour (1 every 20 minuets).
Now for the trick.
Take them, be as strict as you can with the times, don’t think “Oh I feel fine I can go another 30 mins before having another”. Reason for this is once your fuel store is gone its a lot harder to get it back then to maintain. Same thing goes for cramps easier to keep them away then it is to get rid of them.
Long rides I would have one before even taking the first pedal.