10 KiB
Engagement Events Reference
Non-Ecommerce Recommended Events
This reference covers recommended events for user engagement tracking beyond ecommerce transactions.
Authentication Events
login
Purpose: Track user login/authentication
Parameters:
method(required) - Authentication method used
Authentication Methods:
email- Email and passwordphone- Phone number verificationsocial- Social network logingoogle- Google Sign-infacebook- Facebook Loginapple- Apple Sign-inmicrosoft- Microsoft/Office 365saml- SAML enterprise loginfingerprint- Biometric authenticationpassword- Password-onlysso- Single sign-on
Implementation:
gtag('event', 'login', {
'method': 'google'
});
Different Authentication Methods:
// Social login
gtag('event', 'login', {
'method': 'facebook'
});
// Enterprise SSO
gtag('event', 'login', {
'method': 'saml'
});
// Biometric
gtag('event', 'login', {
'method': 'fingerprint'
});
Reporting Use:
- User authentication tracking
- Auth method effectiveness
- Login success/failure analysis
- Funnel starting point
sign_up
Purpose: Track new account creation
Parameters:
method(required) - Registration method
Registration Methods:
email- Email registrationphone- Phone registrationsocial- Social signupgoogle- Google signupfacebook- Facebook signupapple- Apple ID signupin_app- Mobile app signupapi- Programmatic signup
Implementation:
gtag('event', 'sign_up', {
'method': 'email'
});
Alternative Signup Methods:
// Social network signup
gtag('event', 'sign_up', {
'method': 'apple'
});
// In-app registration
gtag('event', 'sign_up', {
'method': 'in_app'
});
Reporting Use:
- New user acquisition
- Registration method performance
- Signup funnel analysis
- Revenue attribution from signups
Content Engagement Events
search
Purpose: Track site/app search functionality
Parameters:
search_term(required) - What user searched for
Implementation:
document.getElementById('search-form').addEventListener('submit', function(e) {
e.preventDefault();
var searchTerm = document.getElementById('search-input').value;
gtag('event', 'search', {
'search_term': searchTerm
});
// Perform search
performSearch(searchTerm);
});
Advanced Implementation:
// Track search with result count
gtag('event', 'search', {
'search_term': 'blue shoes',
'search_results_count': 42 // Custom parameter
});
Reporting Use:
- Popular search terms
- Search-to-purchase analysis
- Search effectiveness
- Missing products (failed searches)
Best Practices:
- Send before results load (immediate)
- Don't include user input errors
- Standardize term formatting (lowercase)
view_item
Purpose: User views product/content detail
Parameters:
items(required) - Array with item_id and item_namevalue(recommended) - Item pricecurrency(recommended) - Currency code
See "items-array-reference.md" for complete details
view_item_list
Purpose: User views collection/search results/category
Parameters:
items(required) - Array of productsitem_list_id(recommended) - List identifieritem_list_name(recommended) - List name
Implementation:
// On category page load
gtag('event', 'view_item_list', {
'items': [
{
'item_id': 'SKU_001',
'item_name': 'Product A',
'item_category': 'Electronics'
},
{
'item_id': 'SKU_002',
'item_name': 'Product B',
'item_category': 'Electronics'
}
],
'item_list_id': 'category_electronics',
'item_list_name': 'Electronics Category'
});
List Types:
- Category browse
- Search results
- Featured/homepage
- Recommendations
- Related products
- Best sellers
- New arrivals
select_item
Purpose: User selects item from list
Parameters:
items(required) - Selected item(s)item_list_id(optional) - List identifieritem_list_name(optional) - List name
Implementation:
document.querySelectorAll('.product-link').forEach(function(link) {
link.addEventListener('click', function() {
var itemId = this.getAttribute('data-item-id');
var itemName = this.getAttribute('data-item-name');
gtag('event', 'select_item', {
'items': [{
'item_id': itemId,
'item_name': itemName,
'item_list_name': 'Search Results'
}]
});
});
});
Reporting Use:
- Click-through rate from lists
- Product popularity
- List effectiveness
- Search result performance
Promotion Events
view_promotion
Purpose: Promotional banner/offer displayed
Parameters:
promotion_id(recommended) - Promotion identifierpromotion_name(recommended) - Promotion name
Implementation:
// On promotion banner visible
gtag('event', 'view_promotion', {
'promotion_id': 'SUMMER_SALE_2024',
'promotion_name': '50% Off Summer Sale'
});
Reporting Use:
- Promotion impressions
- Banner effectiveness
- Which promotions drive traffic
select_promotion
Purpose: User clicks promotion
Parameters:
promotion_id(recommended) - Promotion identifierpromotion_name(recommended) - Promotion name
Implementation:
document.querySelector('.promotion-banner').addEventListener('click', function() {
gtag('event', 'select_promotion', {
'promotion_id': 'SUMMER_SALE_2024',
'promotion_name': '50% Off Summer Sale'
});
// Navigate to sale
window.location.href = '/sale';
});
Reporting Use:
- Promotion click rates
- Promotion-to-purchase funnel
- CTR by promotion type
Sharing and Social Events
share
Purpose: User shares content
Parameters:
method(optional) - Share methodcontent_type(optional) - Type of contentitem_id(optional) - Content identifier
Share Methods:
emailfacebooktwitterwhatsappsmscopy_linkprintnative(iOS share sheet)
Implementation:
// Email share
document.getElementById('email-share-btn').addEventListener('click', function() {
gtag('event', 'share', {
'method': 'email',
'content_type': 'product',
'item_id': 'SKU_123'
});
});
// Social share
document.getElementById('facebook-share-btn').addEventListener('click', function() {
gtag('event', 'share', {
'method': 'facebook',
'content_type': 'article',
'item_id': 'article_456'
});
});
Reporting Use:
- Content virality
- Share method preferences
- Shared content performance
join_group
Purpose: User joins group/team/community
Parameters:
group_id(optional) - Group identifier
Implementation:
gtag('event', 'join_group', {
'group_id': 'premium_members'
});
Interaction Events
select_content
Purpose: User selects specific content
Parameters:
content_type(optional) - Content typeitem_id(optional) - Content identifier
Content Types:
productarticlevideoaudioimagedocumentappgamecourselesson
Implementation:
// Video selection
gtag('event', 'select_content', {
'content_type': 'video',
'item_id': 'video_123'
});
// Article selection
gtag('event', 'select_content', {
'content_type': 'article',
'item_id': 'article_456'
});
// Course lesson
gtag('event', 'select_content', {
'content_type': 'lesson',
'item_id': 'lesson_789'
});
Reporting Use:
- Content popularity
- Content engagement patterns
- Most viewed content
Lead Generation Events
generate_lead
Purpose: Track lead generation (form submission, quote request, etc.)
Parameters:
value(optional) - Estimated lead valuecurrency(optional) - Currency code
Implementation:
// Contact form submission
document.getElementById('contact-form').addEventListener('submit', function() {
gtag('event', 'generate_lead', {
'value': 0, // No monetary value
'currency': 'USD'
});
});
// Demo request (estimate value)
gtag('event', 'generate_lead', {
'value': 500.00, // Estimated annual value
'currency': 'USD'
});
// Enterprise trial (higher value)
gtag('event', 'generate_lead', {
'value': 5000.00,
'currency': 'USD'
});
Lead Types:
- Contact form
- Demo request
- Consultation booking
- Newsletter signup
- Free trial
- Quote request
- Job application
- Event registration
Reporting Use:
- Lead generation funnel
- Lead value attribution
- Form effectiveness
- Lead source comparison
Measurement Guidelines
When to Send Events
Immediate Trigger:
- User action completes (click, form submit)
- Content becomes visible (on page load)
- User selects item
Don't Wait For:
- Backend confirmation
- Page navigation
- API response (unless critical)
Implementation Pattern:
// ❌ WRONG: Wait for confirmation
function handleAction() {
performAction().then(function() {
gtag('event', 'some_event'); // Too late
});
}
// ✅ CORRECT: Fire immediately
function handleAction() {
gtag('event', 'some_event'); // Fire now
performAction(); // Then execute
}
Event Parameter Summary
| Event | Required Params | Recommended Params | Optional |
|---|---|---|---|
| login | method | - | - |
| sign_up | method | - | - |
| search | search_term | - | - |
| view_item | items | value, currency | - |
| view_item_list | items | item_list_id, item_list_name | - |
| select_item | items | item_list_id, item_list_name | - |
| view_promotion | - | promotion_id, promotion_name | - |
| select_promotion | - | promotion_id, promotion_name | - |
| share | - | method, content_type, item_id | - |
| generate_lead | - | value, currency | - |
| select_content | - | content_type, item_id | - |
Testing Engagement Events
Use DebugView to Verify:
-
Login Event
- Check
methodparameter populated - Verify on successful authentication
- Check
-
Search Event
- Confirm
search_termis present - Check on form submission
- Confirm
-
View Item
- Verify items array structure
- Check price and currency
-
Content Selection
- Ensure item_id or content_type present
- Verify on user click
Debug Checklist:
✓ Event fires at correct time
✓ Parameters match specifications
✓ Parameter values are accurate
✓ Event name spelled correctly
✓ No duplicate events
✓ Values are appropriate data type