You should be using gtag.js to send GA events, since that's your method of implementation of GA, not ga() as that's for analytics.js.

The pattern to send an event is:

gtag('event', <action>, {
  'event_category': <category>,
  'event_label': <label>,
  'value': <value>
});

Updated snippet:

$http({enter code here
          method: 'POST',
          'async': true,
          'cache': false,
          'global': false,
          url: //the  correct url,
          isStaySignIn: isStaySignIn,
          isIdamOn: true,
        }).success(function(data, status, headers) {
          $rootScope.Loading = "Loading";
          deferred.resolve({
            data: data,
            headers: headers
          });
          
          //send login event using gtag.js
          gtag('event', 'IDAM', {
            'event_category': 'MODE',
            'event_label':'Login using Jio ID',
          });

        })
Answer from XTOTHEL on Stack Overflow
🌐
Google
developers.google.com › google analytics › set up events
Set up events | Google Analytics | Google for Developers
You can use the Google tag (gtag.js) API with the gtag() function to send events to Google Analytics by specifying the event command, event name, and optional parameters.
🌐
Analytics Mania
analyticsmania.com › post › how-to-track-events-with-google-tag-gtag-js
How to Track Events with Google Tag (gtag.js) - Analytics Mania
May 8, 2025 - Example: These will be triggered on every pageview since no logic was added to explicitly state what actions will trigger these events (parameters are static; see an example with dynamic parameters next) gtag('event', 'test_event_1_no_params') // example 1 gtag('event', 'test_event_2', {'test_parameter':'hey', 'test_value':5}) // example 2
🌐
Google Support
support.google.com › analytics › answer › 14144294
Event setup Q&A - Analytics Help
For example, the following sample code includes an event called button_click. This code must appear after the Google tag snippet. <script> gtag('event', 'button_click', { 'button_name': 'myButtonName', 'screen_name': 'Home' }); </script>
🌐
Google Support
support.google.com › google-ads › answer › 7548399
Use the Google tag for Google Ads conversion tracking - Google Ads Help
<!-- Event snippet for example conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL', 'value': 0.0, 'currency': 'USD' , ‘transaction_id’: `` // `new_customer`: true, /* calculate dynamically, populate with true/false */ }); </script> Note: The new_customer parameter is optional and helps improve the accuracy of new customer acquisition reporting in Google Ads.
🌐
Google
developers.google.com › tag platform › gtag.js › configure google products and send event data
Configure Google products and send event data | Tag Platform | Google for Developers
You can establish data flow between your website and Google products using the config command with the product's tag ID. Use the event command to send specific events, like newsletter signups or purchases, to your connected Google products.
🌐
Finsweet
finsweet.com › gtag › ecommerce-tutorial › what-are-events
What are events? | gtag for eCommerce
An event is any action on your website that you may want to record. It may be a user purchase, a product view or a remove from cart. Google Analytics 4 offers powerful event tracking functionality that allows us to customize data that goes into Google Analytics.
Find elsewhere
🌐
Google
developers.google.com › tag-platform › devguides › events
About events - Analytics Help
Example: A news website might include events like "article_read" when a visitor finishes an article, "video_play" when they start a video, or "newsletter_signup" when they sign up for email updates.
🌐
Google
developers.google.com › tag platform › gtag.js › google tag api reference
Google tag API reference | Tag Platform | Google for Developers
The example below illustrates setting a campaign name and ID for a black Friday shopping event. Because you've used set, all other tags, for example, GA4 Event tags or Google Ads Remarketing tags, can access this data. gtag('set', 'campaign', { 'id': 'abc', 'source': 'google', 'name': 'black_friday_promotion', 'term': 'running+shoes', });
🌐
HeyTony
heytony.ca › home › blog › custom events worth tracking in google analytics
Custom Events Worth Tracking In Google Analytics - HeyTony
August 5, 2024 - Add the following code to your site where the event occurs: <script> gtag('event', 'event_name', { 'event_category': 'category_name', 'event_label': 'label_name', 'value': value }); </script>
🌐
Optimize Smart
optimizesmart.com › event-tracking-guide-google-analytics-simplified-version
Google Analytics Event Tracking Tutorial - Optimize Smart
June 8, 2023 - Learn to set up event tracking in Google Analytics. Learn about generating virtual page views, Advantage of Event Tracking over Virtual pageviews...
🌐
Studio Simpatico
studiosimpati.co › home › developer center › how the heck do i set up a gtag event in google analytics?
How the heck do I set up a gtag event in Google Analytics?
April 21, 2022 - gtag('event', 'recipe_click', { 'event_category' : 'Recipe Cards', 'event_label' : '<?php the_sub_field('heading'); ?>' }
Price   $$$
Call   347-692-8267
Address   4540 Center Blvd, 11109, Long Island City
🌐
Fh-group
fh-group.com › insights › what-is-a-gtag-why-should-i-use-it
What Is a Gtag & Why Should I Use It? - fh group
Google’s new gtag is, per Google, “a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and DoubleClick.” This means it is a code snippet that allows you to easily send data to your each of your Google marketing products.
🌐
BCS
bbccss.com › home › google marketing platform › google analytics › ga4 custom events: gtag method
GA4 Custom Events: gtag Method | BCS
June 11, 2025 - Update time: January 13, 2025 This article introduces how to use gtag method to do custom event tracking. The gtag method is suitable for direct deployment of GA4 without using GTM, Read More:Installing Google Analytics 4 with gtag It requires adding gtag tracking code at the tracking location, ...
🌐
JamesBachini.com
jamesbachini.com › google-analytics-event
Google Analytics Event Tracking | GA Events Setup, Tips & Examples – JamesBachini.com
September 2, 2020 - Google Analytics events can include up to four fields of data. This is an example Javascript event: gtag('event', $action, { 'event_category': $category, 'event_label': $label, 'value': $value });
🌐
Reddit
reddit.com › r/googletagmanager › using google tag manager to send conversion event to google ads?
r/GoogleTagManager on Reddit: Using Google Tag Manager to Send Conversion Event to Google Ads?
March 14, 2024 -

Using Google Tag Manager to Send Conversion Event to Google Ads?

I have a Custom HTML Tag configured in GTM that listens for a JavaScript event for the contact form being submitted. It then sends calls window.dataLayer.push and sends the Google Analytics event. I need to also send this conversion to Google Ads. Can I use the following or something similar to it?

window.dataLayer.push({

"event" : "conversion",

"send_to": "AW-33************"

})

Or if not what would I pass to the push function to send the conversion to Google Ads?

Thanks,

John

🌐
Reddit
reddit.com › r/googleads › why am i seeing a purchase gtag event for my form submission in tag assistant?
r/googleads on Reddit: Why am I seeing a purchase gtag event for my form submission in Tag assistant?
March 27, 2025 -

This is driving me crazy - I have google ads connected to my GA4. I have set up conversions in Google ads using manual tracking through tag manager and for form submissions I have used Submit Lead Form conversion. The set up is correct in terms of tag and trigger in tag manager. However when I test out this form submission in tag assistant - it doesn’t show any hits for the form submission event being fired but it shows hits for a purchase event (with my form tag name). I’m very confused - am I missing something?

🌐
Reddit
reddit.com › r/googletagmanager › should i track an event using both gtag and ga4?
r/GoogleTagManager on Reddit: Should I track an event using both gtag and GA4?
June 18, 2025 -

Hello everyone,

I'm curious about something regarding tracking and would like some advice to ensure I am understanding it correctly.

Usually, I create events and conversions in GTM using the Gtag. However, for reporting and tracking purposes, I also need the event results to be counted and shown in GA4. To achieve this, I also create the same event using the GA4 Event tag.

So in the end, for each event, I have both a Google Tag and a GA4 Event tag. I am confused if this is the correct way to do it.

Correct me if I'm wrong, but I remember that if you only use the Gtag for an event, it will not be tracked in GA4. This is why I have been doing it this way, but please let me know the correct method. Thank you

🌐
Stack Exchange
webmasters.stackexchange.com › questions › 132488 › where-is-my-gtag-category-and-label-data
event tracking - Where is my (gtag) category and label data? - Webmasters Stack Exchange
It seems the answer is probably here. Apparently in the GA4 UI, one has to turn on event_category and event_label as explicitly reported custom dimensions.