Skip to content

Custom Events ​

Custom events let you track any interaction specific to your app. They appear in analytics but are not used by Markopolo for platform features like campaign optimization or product sync.

Event Naming (PascalCase) ​

Custom event names must be PascalCase, same as pre-defined events:

js
mtag('event', { type: 'VideoPlayed' });
mtag('event', { type: 'LessonCompleted' });
mtag('event', { type: 'ProjectCreated' });

Usage ​

js
mtag('event', {
  type: 'YourCustomEventName',  // PascalCase required
  email: 'user@example.com',   // Optional — include when available
  phone: '+13425784032',       // Optional
  parameter1: 'value1',
  parameter2: 'value2',
});

Examples ​

Media & Content ​

js
mtag('event', {
  type: 'VideoPlayed',
  email: 'user@example.com',
  video_id: 'VID-12345',
  video_title: 'Product Demo',
  video_duration: 120,
});

SaaS & Apps ​

js
mtag('event', {
  type: 'ProjectCreated',
  email: 'user@example.com',
  project_id: 'PROJ-123',
  project_type: 'marketing',
});

E-Learning ​

js
mtag('event', {
  type: 'LessonCompleted',
  email: 'student@example.com',
  course_id: 'COURSE-101',
  lesson_id: 'LESSON-5',
  quiz_score: 85,
});

Custom vs Pre-defined Events ​

Custom EventsPre-defined Events
Platform FeaturesNoYes
NamingPascalCasePascalCase
SchemaAny structureSuggested schema
Analytics✅✅