Skip to content

Client for the event-based (v2) Google Analytics Measurement Protocol

License

Notifications You must be signed in to change notification settings

kmcclellan/gamp-event-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GAMP Event Tracking

Client for the event-based (v2) Google Analytics Measurement Protocol.

Features

  • Manually send tracking data for Google Analytics App + Web Properties.
  • Easily build GAMP requests using fluent syntax.
  • Compatible with Microsoft.Extensions.*

Installation

Add the NuGet package to your project:

$ dotnet add package gamp-event-tracking

Usage

Register client using Microsoft.Extensions.Http:

services.AddHttpClient<ITrackingClient, TrackingClient>();

Send an event to GAMP using ITrackingClient:

await client.Collect(collection =>
{
    collection.Parameters
        .AddTrackingId("G-XXXXXXXXXX")
        .AddClientId("gamp-readme");

    collection.AddEvent("test")
        .AddEventParameter("hello", "world!");
});

Documentation

Since App + Web is still in Beta, there isn't any documentation for the tracking data supported by the v2 GAMP API. The parameters exposed on this API are subject to change, and their exact meaning is uncertain.

What information I've discovered is provided via XML/intellisense documentation. These resources may also be useful:

About

Client for the event-based (v2) Google Analytics Measurement Protocol

Topics

Resources

License

Stars

Watchers

Forks

Languages