To integrate Google tag manager,
Go to tagmanager.google.com and login with your credentials.
Click Tags and click New. A window appears.
Enter the Tag title.
Click Tag Configuration.
Select Custom HTML.
Paste this code in the HTML text area.
Select All Pages.
Click Save. You will be redirected to Workspace.
Click Submit. The Submit Changes window appears.
Enter the Version Name and Version Description.
You can also refer the following video, which demonstrates the above steps.
The above video is only for your reference on where to add the code. It does not contain the code itself. Please refer the link in Step 7 for the actual code.