Fifa approves the use of technology in football to verify goals. Hawk-eye and GoalRef, see how they work.
Hawk-eye is exactly what is currently used in tennis (high-speed cameras from several angles to confirm exactly where the ball was). GoalRef is the chip technology that alerts the ref when the ball goes over the line to score a goal.
IMHO, they should have followed the rugby route and just use the instant replay analysis. It would allow for intervention not only for “was the ball in or not” situations but also for clear offside, handballs or other clamorous mistakes that are still a disgrace to the sport.