Begin by logging in to Google Tag Manager and selecting the account that you want to add the DXA script to. Click New Tag or Add a new tag as shown in the image below.
From here, give the tag an appropriate name such as DXA, and under Choose Product, select Custom HTML Tag and then click Continue.
In Step 2, Configure Tag, add the DXA script where it asks you to add HTML and then click Continue.
In Step 3, Fire On, select the pages that you want the DXA tracking script to fire on and therefore collect data for. To fire and collect data for all pages, select All Pages such as in the image below. Then click Create Tag shortly followed by Publish.
Upon clicking Publish, you will be given the option to preview and debug, which will allow you to see if the tag does fire as expected. Once happy with the changes, simply click Publish Now.