Heart of Midlothian continued their scintillating form as they came from behind twice at Dens Park to defeat Dundee 3-2, opening up a 12-point lead in third place.

Steven Naismith's men have now won seven of their last eight in the league and it's their best run of form in the top flight since 2010/11 when Hearts won 10 out of 11, drawing the other.

Lawrence Shankland was once more the protagonist, scoring twice to turn a 2-1 deficit into a 3-2 win in what was a topsy-turvy fixture in the City of Discovery.

READ MORE: Hearts win AGAIN: Shankland reigns supreme, resilience, incredible run

"I thought it was good, entertaining football," Naismith said afterward. "I think it was two teams that are confident and well-coached, and two teams that have a never-say-die attitude. That’s the way the game went."

He added: "It became a bit more open and both teams had chances, but we made the right choices in the second half in our attacks to get us the win."

That is reflected in the match stats above. There were plenty of shots from both teams with a very even xG. The possession share is what you would have expected with Hearts wanting to control the game and Dundee slightly more comfortable breaking in transition with Owen Beck, Luke McCowan and Lyall Cameron all supporting the front pairing.

Team set-up

The two teams' formations were pretty defined, Dundee in a 3-5-2 system and Hearts in a 4-3-3 shape. 

Hearts made sure there was width higher up the park but perhaps didn't get players close enough to Shankland. Beni Baningime was once more the main receiver of passes in the centre of the pitch.

It is no surprise to see a grouping of Dundee players on the left. Beck and McCowan combined well as they did for the opening goal and could have a strong relationship for the remainder of the season.

It is no surprise to see a lot of Hearts pressure out of possession focused on their right-hand side to combat that threat. 

Meanwhile, Dundee were more than happy to wait until Hearts were advanced further up the pitch before engaging, often doing so out wide or in their defensive third.

Match momentum 

"I thought we started quite well and got control in the game," Naismith said.

He was right. The visitors settled well, moved the ball efficiently and created openings with Shankland hitting the woodwork and Alan Forrest testing Trevor Carson after creating space in the box. But as soon as Dundee edged ahead the momentum changed as demonstrated in the race chart below. The goal rocked Hearts and they struggled to get a grasp of the game until later in the half which they finished strongly. Carson again having to make a couple of smart blocks. 

"The niggle at half-time was our decision-making in the final third, and our tempo at times when we were moving the ball," was Naiismith's view.

After the interval, it was more chaotic but also followed a predictable pattern at the same time. Hearts got level but Dundee hit back straight away. With the away side trailing they pushed and pushed, recording six efforts to Dundee's two between Cameron's goal and Shankland scoring to equalise from the penalty spot.

It was Dundee's turn to push, Zach Robinson missing what was deemed, penalty aside, the best chance of the game going by xG value (0.29 for his 82nd-minute header). Then Shankland scored and Hearts held onto the lead.

The Hearts chances and Shankand's dominance

Including the penalty, Hearts had 18 shots. Eight of those were Shankland's. He contributed 1.10 to the team's overall xG of 1.70. Naismith spoke of the decision-making in the final third and you could look at the shot map and see reasons why. Firstly, there are three shots from quite far out that were blocked, including a contender for the worst effort of the season when Dexter Lembikisa dragged one from about 35-40 yards with the referee awarding a corner. There were another three blocked from the edge of the area. 

It should be noted, in this writer's opinion, that there is absolutely nothing wrong with long-range efforts. They are fun and are much better than trying to constantly walk the ball into the net. Plus, we've seen how effective they have been recently with Shankland's goals against St Mirren and Aberdeen, plus Calem Nieuwenhof's against Dundee at Tynecastle Park. But it is picking the right moment to shoot and the right moment to potentially move the ball and create a better opening.

READ MORE: Steven Naismith Q&A: Hearts threat, Shankland's starring role and Sibbick start

Set-piece luck?

An area we have covered or spoken about quite a lot on Hearts Standard is the vast improvement in defending set-pieces. As things stand, Hearts have conceded just one goal from a set play in the league all season and none from a corner. Both are the best records in the Premiership, unsurprisingly.

However, here is the kicker. Which team has the highest expected goals conceded from corners and set plays? Hearts!

Therefore you could say there has been an element of good fortune to the team's current record of one goal conceded. In fact, Naismith talked about that at the recent coaches' presentation event.

On Saturday, Hearts came up against the team that have scored the most number of goals from set pieces this campaign.

Dundee's 12 is twice the number of five teams, including Hearts, that have scored six, the second-highest amount. Tony Docherty's side are outperforming what is expected of them but not to the extent of Hearts and their defensive record from set pieces.

Two of Dundee's best chances which they failed to take came from corners. The two closest to the goal line on the shot map below.

They were two very different efforts and demonstrated the strength of Hearts packing the box with players but also one of the downfalls of zonal marking.

The first is Michael Mellon's effort with his back to goal. Dundee win the first contact with Jordan McGhee but look at the bodies in the box.

We can see Mellon is being marshaled by Lembikisa, he can't get a clean contact and Shankland is in place to divert the ball wide without too much stress.

Owen Dodgson has the chance in the second half. We can see where he starts his run. Trying to go under the radar at the back post.

Unopposed he gets in between Frankie Kent and Shankland.

It is only Zander Clark's big frame that prevents him from scoring.

In the end, Naismith best summed it up.

"We made the right choices in the second half in our attacks to get us the win."