Google Analytics Events

Component ID

2654378

Component name

Google Analytics Events

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

632

Component created

Component changed

Component body

What it does

This module is an API module, it does nothing out of the box if you don't write any code.

This modules enables developers to issue Google Analytics Events server side, even during Ajax requests.

Once enabled, simply trigger an event with the following code:

      Drupalgoogle_analytics_eventsEventService::getInstance()->queueEvent(
          (new Drupalgoogle_analytics_eventsEvent())
          ->setHitType('event')
          ->setEventCategory('checkout')
          ->setEventAction('personal_data_submit')
          ->setEventLabel($curso->titulo->value())
          ->setEventValue(0)
        );

You can assign values to events to, for example, track the exact expense of a conversion after an accepted online transaction completes (PayPal, credit card, etc.)

This event data is attached to the current request Drupal Settings object and then processed on the client side to be sent to Google Analytics.

Support

This module is developed and maintained in personal time. If it was useful to you,


Paypal Donate

Or use Bitcoin:

Paypal Donate

1MXo2pFjoE6hF63D9xscTQ12kBikNsE8Ec