Setup instructions for Google Analytics 4

Using v4_gtag and entering G-XXXXXXXXXX is resulting into multiple page views for single page visit.

Also is there any way to avoid inserting analytics code in admin section?