What's your platform?
Adding the code snippet to your WordPress is very easy. You can actually do this in so many different ways. For the sake of convenience, we shall use a plugin.
Head over to the WordPress dashboard, and click on Plugins in the dashboard menu
Search for a plugin called "Insert Headers and Footers" by WPBeginner (Image below)
Once you've installed this plugin, hover your mouse on "Tools" (on the wordpress dashboard) and click on "Head and Footer Code"
The final step will be to place the code snippet into the "FOOTER code" section box and click save.
All you have to do for this is to paste the code before the closing body tag.