Git Product home page Git Product logo

ga4d's Introduction

GA4D - Google Analytic for Delphi

The GA4D library was created so that applications developed in Delphi can be analyzed more precisely, giving the possibility of better decision making on the behavior of users in the application.

  • Link online and offline behaviors;
  • Evaluate client-side and server-side interactions;
  • Send events that happen outside of standard user interaction (e.g. offline conversions);
  • Send events from devices and applications that do not have automatic collection available (e.g. kiosks, clocks, etc.).
In order to send the events to the GA4, it is necessary to pass the following parameters to the GA4D:
  • APISecret To create a new secret, navigate the Google Analytics UI to: Administrator > Data flow > choose your flow > Measurement Protocol > Create

[!IMPORTANT] It is recommended that you keep this information private within your organization, or as best you like, as long as you have greater security about this information.

  • ClientID: Uniquely identifies an instance of your application.
  • UserID: Optional. Identifies the user, which can be some identification tag for your system, but can be added > to the ClientID name.
  • MeasurementID: Id de Métricas. Identificador do fluxo de dados. Ele pode ser encontrado na IU do Google Analytics em: Administrator > Data Flow > Choose Your Flow > Metrics Id.

Once you are in possession of the GA4 validation codes, simply add this information into your system:

declare a variable so it can be used in your project:
    private
        FGA4D: iGA4D;
In order for the library to have the settings registered, it is necessary to call this way:
    FGA4D := TGA4D.New;
    FGA4D
    .Config
      .APISecret(APISECRET)
      .ClientId(CLIENTID)
      .UserId(USERID)
      .MeasurementId(MEASUREMENTID); 
Within your system, just call the event you want so that it is registered in GA
    FGA4D
        .Build
        .Name('Name of the event that will be held in GA')
        .Engagement('Event call time in milliseconds')
        .Push;

Tip

For better understanding of using the library, we have an example unit test.

ga4d's People

Contributors

alepmedeiros avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.