A custom event is:
v=1 // Version.
&tid=UA-XXXXX-Y // Tracking ID / Property ID.
&cid=555 // Anonymous Client ID.
&t=event // Event hit type
&ec=video // Event Category. Required.
&ea=play // Event Action. Required.
&el=holiday // Event label.
&ev=300 // Event value.
v=1 // Version.
&tid=UA-XXXXX-Y // Tracking ID / Property ID.
&cid=555 // Anonymous Client ID.
&t=event // Event hit type.
&ec=UX // Event Category. Required.
&ea=click // Event Action. Required.
&el=Results // Event label.
&pa=click // Product action (click). Required.
&pal=Search%20Results // Product Action List.
&pr1id=P12345 // Product 1 ID. Either ID or name must be set.
&pr1nm=Android%20Warhol%20T-Shirt // Product 1 name. Either ID or name must be set.
&pr1ca=Apparel // Product 1 category.
&pr1br=Google // Product 1 brand.
&pr1va=Black // Product 1 variant.
&pr1ps=1 // Product 1 position.
ga('send', {
hitType: 'event',
eventCategory: 'Videos',
eventAction: 'play',
eventLabel: 'Fall Campaign'
});
function handleOutboundLinkClicks(event) {
ga('send', 'event', {
eventCategory: 'Outbound Link',
eventAction: 'click',
eventLabel: event.target.href,
transport: 'beacon'
});
}
In segment.io, a custom event is a called a track
Example of a track for a button.
analytics.track('Clicked CTA', {
location: 'header',
type: 'button'
});
SELECT COUNT(id)
FROM clicked_cta
SELECT DISTINCT i.name
FROM identifies i
JOIN clicked_cta cc ON cc.user_id = i.user_id;
window.mixpanel.track("Song Played", { // the event or action the user performed
name: "What Do You Mean", // specifics of the event
artist_name: "Gleeband"
album: "Purpose",
label: "Def Jam - School Boy",
genre: "Dance Pop"
});
Column | Description |
---|---|
Anonymous_id | The anonymous ID of the user |
user_id | The unique ID of the user |
context_<key> | Non-user-related context fields sent with each page or screen call - Google Analytics - Browsing Context ( URL , screen, ) |
event | The slug of the event name, mapping to an event-specific table (without space) |
event_text | The name of the event (with space, …) |
id | An ID attached to the event at execution time and used for deduplication at the server level. |
received_at | When the page or screen call was received |
sent_at | When the page or screen call was triggered by the user |
Column | Description |
---|---|
Anonymous_id | The anonymous ID of the user |
user_id | The unique ID of the user |
context_<key> | Non-user-related context fields sent with each page or screen call - Google Analytics - Browsing Context ( URL , screen, ) |
event | The slug of the event name, so you can join the tracks table. |
event_text | The name of the event. |
id | The unique ID of the track call itself. |
received_at | When the page or screen call was received |
sent_at | When the page or screen call was triggered by the user |
<property> | Each property of your track calls is created as its own column, and the column type is automatically inferred from the data. |