Dundee made two changes to their team when Fin Robertson and Seb Palmer-Houlden came in for Scott Tiffoney and Simon Murray, who were both on the bench.
Hearts started the game well and were trying to score early. They were getting a lot of balls into the box andxthey missed a couple of chances in the first tens minutes.
Dundee were struggling and gave the ball away too much and a goal had to come. It did after 21 minutes, a long cross was headed home by Shankland.
Dundee continuted to struggle and it was clear changes had to be made, but they fell 2-0 down when another shot was saved by McCracken but the ball was pushed out to the middle of the goal, it fell nice for Shankland to score his second of the game.
Dundee did have a ten minute spell, but failed to create anything of note, at least they got to half-time.
Second half and they made two changes Simon Murray and Ethan Ingram came on for Seun Adewumi and Fin Robertson. Jordan McGhee moved to left wing back and Josh Mulligan switched to central midfield.
Other changes were Tiffoney replaced Palmer-Houlden , and Vetro came on for Mulligan late on.
Dundee came close to conceding an embarrassing third goal when McCracken battered a clearance against Billy Koumetio and set up Dremmeh to run the ball into the empty goal from 35 yards. Fortunately the offside flag spared the Dark Blue blushes.
They looked better, but never forced Gordon into a save during the 90 minutes, apart of a diving save at Murray's feet late on.
In injury time Portales put a header over the ball from a tight angle and that was that full time.
Dundee: McCracken, Astley, Portales, Koumetio, Mulligan (Vetro 83), McGhee (c), Sylla, Fin Robertson (Ingram at half time). Cameron, Adewumi (Murray at half time), Palmer-Houlden (Tiffoney 61). Unused Subs: Sharp (gk), Carson (gk), Main, Kelly, Braybrooke.
Referee: Colin Steven
Att: 18,787