I hope you've already worked this out, but being as this post at the top of most SERPs, I figured I'd answer the question for others.
I'll answer for both on premise and for cloud...
Make sure that you use the new GA4 style data collection snippet as this will automatically track updates to single page apps.
Choose Administration > System.
Select User Interface > Announcement banner in the System panel below.
Enter the snippet (where G-****** is your measurement ID):
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-******"></script>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
Select the required Visibility Level for the banner.
Click the Set Banner button.
There are currently 2 listed which provide tracking for Jira Cloud.
Note: My company "David Simpson Apps", provides Google Analytics in Jira & JSM.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events