I've read varying accounts of tanks' effectiveness in WW1, some sources suggest they had mixed success at best, while others say that they were key in in the last year of the war.
Really, both of these views are correct, depending upon one's definition of success, and more specifically, how they were used.
Early tanks suffered from a host of design flaws, technical limitations, and doctrinal flaws that meant they often were not as effective as one might expect. Unfortunately, these factors often limited their usefulness in combat, particularly the later two. Low speed, breakdowns, and poor planning meant that what otherwise might have been successful use was negated, while piecemeal use of tanks earlier in the war primarily as obstacle clearing tools and infantry support rather than direct combat instruments meant they could be quickly dispatched.
Let's compare two battles for why this was the case. First, the Battle of Cambrai in 1917. This was one of the first 'large scale' uses of the new weapons, in this case by the British. The tanks helped achieve a breakthrough in the German lines very effectively. However, despite being a tactical success to a degree, strategically it was a failure. Why? Primarily it comes down to the exposing of the technical weaknesses of the tank (namely, it was fairly easily dispatched by direct fire from artillery pieces) as well as the doctrinal failures of simply not using them to more quickly overcome defenses. They could smash through front lines with ease, but because their role was primarily one of support they were not utilized to drive deeper into territory and thus open up a larger hole. In addition, the tanks were limited by the terrain to a degree, due to an incomplete doctrinal understanding of how best to deploy them.
Compare this to the Battle of Amiens in 1918. Here, more than five-hundred tanks were used to not only repeat the breakthrough of Cambrai, but then continued on to punish the flanks of that breakthrough. The quality of tanks was marginally improved (Mark V was being deployed here instead of solely Mark IVs) but the technical limitations largely remained. Effective planning around those limitations was the key difference.