In the summer of 2013 Pep Guardiola, recently appointed as the manager of Bayern Munich, granted Martí Perarnau, a friend and journalist, full behind-the-scenes access to his new club for a year. He shadowed the Spaniard on and off the pitch through the highs and lows of his title-winning campaign, gaining unique access to his staff and players to unveil the secrets of the man and his methods. The only condition was that nothing could be published – until now.

Here, the Guardian takes two extracts from Pep Confidential showing Guardiola’s personal side post-match and also the extraordinary lengths he goes to in preparing for a match.

I look at the footage of our opponents and then try to work out how to demolish them

Munich, 31 January, 2014

As a rule, Guardiola gives three team talks before each match, each of them about 15 minutes long. He uses images to clarify his points, usually video footage that doesn’t last more than seven minutes. The three talks follow the same pattern.

The day before the match Pep dissects their opponent’s attacking play. Using video footage he points out where their adversary is likely to be most dangerous, drawing attention to the way key players work. The coach then gives his men specific instructions about the defensive moves Bayern should make to stop the other team. His men then implement these instructions in the training session that follows.

He gives his second talk just before the training session on the morning of the match. It consists of a detailed explanation of how they use defensive and attacking throw-ins and free-kicks. The assistant coach [Domènec] Torrent has studied the last 50 corner kicks the rivals have taken and explains anything significant that they regularly try. Torrent will remind the substitutes of the positions they need to be in for set-plays, just before they enter the match. After this talk the team does some light training during which they run through the attacking and defensive moves they have just covered. Pep still won’t have decided on his lineup so everyone has to take part in all the moves. If it’s an away match they don’t do this. Instead, they review video footage of them practising those free-kicks in Säbener Strasse.

Pep delivers his third and final talk two hours before the match in the team hotel (he prefers not to do it in the dressing room). You could call it a motivational talk but it will also include a technical review of Bayern’s attacking tactics. This is also the moment the coach tells his men which of them are in the starting XI.

The players know exactly what to expect by now. This talk will focus solely on how to attack. Precisely how they’ll use the first corner kick or wide free-kick they win will also be specified by the coach.

Usually, although not always, Pep will also use the talk as a motivational tool. For example, in the return leg of the Champions League quarter-final against Manchester United in early April Pep dropped this third talk. On that occasion he had already named the team the day before, they had practised their attacking moves and he felt there was nothing else to add. In contrast, the team arrived at Mönchengladbach’s Borussia Park with just minutes to spare for the first match of 2014 on January 24 because Pep’s talk had delayed them. He wanted to leave his men in no doubt as to why they had been resoundingly thrashed six days before in a friendly in Salzburg: they hadn’t bothered to run and their game had lacked intensity.

“I can take us so far,” he told them. “I can analyse our opponents and use my tactical know-how to place you in the best positions. So, for example, today David [Alaba], I don’t want you going too far up the pitch because Stuttgart’s right wing [Martin Harnik] could do us some damage. But from here on in lads, it’s down to you. If you choose not to play with intensity, if you decide you’re not going to run your legs off out there, well, we won’t win the match.”

Pep plans his three talks only after a detailed analysis of the opposition and his own team. These talks also reveal his talent for innovation. Xavier Sala i Martín, who is an economics professor at Columbia University, puts it like this: “For me, Pep is a great innovator. He wins matches by analysing his opponents’ weak point and then attacking it. But, more than that, he introduces constant innovations so that even if his opponents catch on and correct their own errors, Guardiola has already altered his strategy. He is always one step ahead and manages to stick to his own game philosophy of superiority in the middle of the field whilst at the same time adapting Bayern’s game to the characteristics of their current opponent.”

In October 2012 in New York he had chatted with Garry Kasparov about how to attack the adversary in chess and other sports, and Kasparov had told him: “You wouldn’t attack in the same way from a mountain top as you would from wide open countryside.”

He had also dined in New York at the end of 2012 with Ferran Adrià, the gastronomic genius who was about to close his restaurant El Bulli. The chef told him: “Pep, you’re more than a coach, you’re a great innovator.”

The coach had responded: “Look Ferran, all I do is look at the footage of our opponents and then try to work out how to demolish them (in actual fact he used a rather more prosaic and somewhat obscene term). All I do is study my arsenal of weapons and pick the ones I need for each occasion.”

In order to fully understand how this analysis of Bayern and their opponents is generated, we need to talk to Carles Planchart, who is in charge of Guardiola’s team of analysts and who has worked with the coach since 2007, when he took over at Barça B. Planchart explains the different stages he and his team go through: “There are basically two parts to this job: the analysis of your own team and that of your opponent. And they are two entirely different tasks. You’re working in a club that has a game every three days, so you just don’t have time to correct all their mistakes on the pitch. You therefore need to use other methods to communicate the corrections which are impossible to get through to them during a game. If you happen to have a whole week of training sessions then, of course, you can plan a series of exercises to correct the errors. For example, if the defensive line is too high or too deep, or if there’s too much space between the team lines, or there’s a problem dealing with crosses, or if we are defending badly at the front post. Otherwise, the most efficient method is to show them visual images, because that gets the idea across very quickly.”

At the end of every match the analysts agree their conclusions about the play they’ve been watching. They’ll comment on collective and individual action as well as the strategic and tactical side of things. Pep will then work one-to-one with specific players during the week, or decide to save the information for a more appropriate time. Usually, however, strategic and individual adjustments have to be made immediately and these will then inform the analysis of the next game.

This season Planchart’s team have added another dimension. They now analyse each player’s moves as well as looking at the tactical plays. By the end of the match they have a detailed account of all the specific moves each of the Bayern players has made and can judge whether or not they have made the right decisions. They have opened a file on each player in which all his plays are noted in detail. After the match they organise these into categories of play. For example, there will be a list of aerial challenges, headers, dribbles and so on. They can then show each man specific images which help him as an individual or in the context of his position in the team, or with a view to tactical priorities. All of the footage is filmed with a wide angle, so that they can judge the player and his work in terms of the tactical work of the team, not just how he does individually and technically.

“Pep always likes to see the whole match and we load it on to his computer as soon as the match is over,” continues Planchart. “He might then look at the whole game or watch the particular moves we’ve categorised, either player by player, or by type of move, or under different tactical headings. He’ll also find my notes there, both details from the match and specific things we’ve agreed to watch out for. As well as getting the match broken down like this, Pep likes to review the match himself and he produces his own analysis.”

The other part of this analytical process consists of breaking the rival down, a vital stage in the process of choosing Bayern’s own approach to the game. The German league records every Bundesliga and Bundesliga 2 match in panoramic format and then makes the footage available to clubs first thing every Monday morning. The Champions League has no equivalent service and it is hugely difficult to tape the matches – so much so that clubs have been known to indulge in trickery such as using a small, hand-held camera to record from the stands, or wearing glasses fitted with a recording device.

It is absolutely vital to record matches in situ in panoramic format so that the action can be studied from a tactical point of view. “In Germany, scouting is considered a part of the job and not some form of espionage. The clubs themselves even pass footage to each other. It’s normal practice here,” Planchart explains.

It is also vital to analyse the opponent in order to select the right playing system, the players you’ll need and even the training exercises they’ll do in the run-up to the match. “In Barcelona, whenever we played a Champions League final we would analyse our opponent’s last 12 matches, and for ordinary games we’d watch an average of five or six. We have to take account of the time of year and the type of team our opponents are facing in each game. It makes a difference whether they are taking the initiative or waiting for a chance to counterattack, if they have a similar playing style to ourselves, etc. If your opponents are going up against teams that are similar to us, that’s fantastic. If not, it’s much less meaningful.”

After analysing the five or six games, Planchart prepares a report for Pep, organised according to concepts and the related moves. It will be a visual presentation, which is much easier to understand, and which will offer three examples of each concept in action. If Pep finds this helpful, he’ll then base his own work around the information presented.

“Normally as soon as the match is over or first thing the next morning, I give him the report on our next opponent. I work two weeks ahead, but he just concentrates on the next game. Sometimes I’ll give him some of the Champions League information a bit earlier and then, if he has a week without a Wednesday fixture, he can have a look at it a bit earlier than usual. But usually he just works from game to game and only once a match is over can he think about the next one.”

Guardiola has a look at the report first. It covers around 50 or 60 different moves and allows him to get a general idea of how to prepare his next game. Sometimes it even gives him a clear idea of the lineup he’ll need. He can then start to plan the training activities with Torrent and [Lorenzo] Buenaventura, bearing in mind specific aspects of the game. In the next few days, he’ll do a detailed analysis of their opponents, looking at matches, or parts of matches and drawing his own conclusions. He makes lots of notes and decides on the key ideas he needs to transmit to his men. Sometimes he combines these with concepts developed from previous matches, either because he wants to revisit a particular move or tactical idea or for motivational purposes.

Pep Confidential – the inside story of Pep Guardiola’s first season at Bayern Munich. Photograph: Arena Sport

During the match, Planchart and his team also send images of specific moves to the bench where Torrent receives them on his iPad: “Carles sends things he’s noticed himself or specific moves we’ve asked for to my iPad – corner kicks, a type of counterattack … we ask for it in image form so that Pep can see it almost simultaneously.”

The analysts in the stands have their camera connected to Torrent’s iPad, to the computer in Pep’s office and to the computer in the dressing room, which is connected to a screen on the wall. In real time, Planchart selects and sends those moves he thinks are relevant and saves others for later. Then, five minutes before half-time, he nips down to Pep’s office and files the entire footage of the first half. Obviously they don’t have the same network of connections away from home and Planchart has to take his own computer down to the dressing room.

He usually picks three or four concepts to cover at half-time and will use two or three three-second videos to demonstrate what he means about each one. In total, there will be rapid shots of roughly 10 specific moves. “What are we doing at half-time? That’ll be Pep’s first question. He comes into his office and asks, ‘what are you seeing up there?’ Because you get a completely different view of the action from up above and you spot different things. He always listens attentively when I make my report. In fact Pep is always listening, always analysing. He’ll discuss with Torrent how to correct faults or how to change the game. He then makes a note of the few concepts he wants to correct and goes off to the players’ dressing room. With about five or six minutes to go, he’ll call the relevant players over, show them the images and tell them what he wants to change. And then off he goes, back to the bench.”

As Pep said to Adrià, innovation can sometimes be the most prosaic of processes.

“All I do is look at footage of our opponents and then try to work out how to demolish them.”

‘Always pick the good ones. Always’

Munich, 29 March, 2014

THIS IS GUARDIOLA at his fascinating, volcanic best – post-match Pep.

Immediately after dealing with the media he goes to the players’ restaurant in the Allianz, takes a glass of champagne, spears a few cubes of parmesan cheese and spends the next half an hour talking about the match.

Usually he stays on his feet or occasionally sits down at one of the tables. But, although he won’t have eaten all day, he’s nowhere near ready to eat yet. Once the game finishes he’s voraciously hungry but he’s still not in the right frame of mind to relax and eat the dish of marinated salmon he loves so much. First he needs at least 30 minutes to burn off the adrenalin accumulated not just during the match but over the previous couple of days. So he gets right down to it. He talks almost incessantly about everything that has happened during the match. Everything has stuck in his memory. “Did you see what Rafinha did in the 18th minute? He moved two metres inside and closed off the channel where they were queuing up to attack us.”

No, I hadn’t noticed any of that. Pep is blessed with an almost photographic memory which allows him to remember and analyse everything that has happened in the match. In this he resembles Rafa Nadal, a tennis star capable of recalling every shot and every point of his matches, his level of dominance or the error he or his opponent made and which moment was most significant. And all of this remains with him long after the match is over. Similarly, Guardiola remembers every move: how it developed, what happened, which players got involved and what the consequences were. On the other hand, he pays no attention to stats.

“You didn’t have nearly as much possession – only 63%,” I say to him.

“Yeah, really? Wow.

“But [Tom] Starke had more touches on the ball than any one of the Hoffenheim players!”

“Wow. No way. That’s really good.”

Statistics don’t turn him on. What gets him passionate is the play itself and his post-match analysis of it.

“Have you seen how smart Philipp [Lahm] is? How the guy turns and protects possession and also splits the opposition?”

Or: “I’ll have to speak to Kroos because against [Manchester] United he definitely won’t be able to try that move where he controls and turns to the right, because they’ll anticipate, rob him and start a counterattack.”

He calls Planchart over to the table: “Carles, tomorrow morning get me a video of the 36th minute – the thing you mentioned to me. I want to show the centre-half how better to position himself.”

During this pretty amazing half hour, standing in his corner of the restaurant, gesturing wildly as if he’s still mid-match, Pep reproduces most of the preceding game. He breaks it down and it’s like he’s performing an autopsy. The skeleton is stripped of every muscle and tendon. He’ll analyse his players, the opposition, each phase of the game, every important move. He goes over how the goals happened – this involves him recalling exactly how the move started and developed and then tracking it right up to the point the ball actually went in.

Then his thoughts will turn to other matches. While he’s still doing his replay of this match, he’ll start to explain what the next one will be like, how he’s going to coach the team during the week, who is going to be rested – then he’ll spool back a bit, still eating chunks of cheese but with the champagne almost untouched, and he’ll agree with Torrent that before the next game they’ll have to practise a specific free-kick. There’s a hug for [Arjen] Robben, who has come over to say goodbye with his three lovely blonde kids. Pep reminds the Dutchman of the sharp little movement he produced with his right foot 10 minutes before the end and tells him to “do it more often please”.

Seconds later he’s praising the work of the Red Bull Salzburg coach, Roger Schmidt, and breaking down the way in which the Austrian champions play. How the forwards press, how the full-backs push on and the positions the attacking midfielders take up.

All the while he’s explaining this in such detail that you’d think his team is playing Salzburg tomorrow and I’m wondering why on earth he has gone off on this tangent.

But this is Pep, and two minutes later he’s changed tack and is talking about the little forward chip [Andrés] Iniesta used to put the ball over the two centre-halves and make them turn during the Barça-Espanyol game earlier this evening.

“But when did you see that move?” I ask him.

“When I was waiting in the hall. What a marvel Andrés is. He’s a genius.”

This is Pep at his most passionate, and it is a joy to be around him. This half an hour of champagne and cheese is the manifestation of his passion for football but it is also a lesson in foresight and pragmatism.

One night I’m accompanied by Patricia González, the very young coach of the Azerbaijan Under-19 women’s team. During the dinner Pep gazes at her and says: “Patricia, I’ll give you some advice: always pick the good ones. Always!”

The young coach then asks him a really good question. “Pep, who are the good ones? Is it the most famous players?”

“No. The really good players are the ones who never lose the ball. Those who know how to pass it and who never lose it. They are the good ones. And that’s who you must always use, even if they are lower profile than the rest.”

‘Pep Confidential: The Inside Story of Pep Guardiola’s First Season at Bayern Munich’ is out now in paperback and ebook, published by BackPage Press / Arena Sport