4

I have recently started working on Google Analytics. I have added the following script just after the head tag

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXXXX-X');
</script>

Now i am inserting another script to create an event. After doing this , when i visit Google Analytics dashboard and go to REAL-TIME->Events->bottom most table , i can find the 'Event Category' with value 'engagement' and 'Event Label' as 'generate_lead' but how do i see other parameters that I am passing like 'value','currency' and 'transaction_id'. I want to check these parameters as well but i can't find it anywhere . Also can i map my own key-value pairs with the event by adding my custom parameters just like 'value','currency' and 'transaction_id' (which are already defined parameters associated with 'generate_lead' action) ?

gtag('event', 'generate_lead', {
                  'value': '2',
                 'currency': 'USD',
                 'transaction_id': '1234'});
NEHA
  • 89
  • 1
  • 2
  • 5

0 Answers0