Developer
User guidesDeveloper websiteHelp centerLog in
  • Welcome!
  • Organisations structure
    • Datamart
    • Users and roles
  • User points
    • User identifiers
      • Networks IDs
        • Device-based Network IDs
          • Custom Device ID integration
          • ID5
          • First ID
        • User-based Network IDs
          • Custom User ID integration
          • UTIQ martechpass
      • Accounts
      • Emails
      • Device identifiers
    • User activities and events
    • Compartments
    • User profiles
    • User segments
    • Hyper point & Quarantine
  • Data model
    • Defining your schema
    • Computed fields
      • Concepts
      • Setup
      • Development
      • Examples
  • Data ingestion
    • Real time user tracking
      • Website tracking
      • Mobile apps tracking
      • Ads exposure tracking
      • AMP tracking
      • Conversions tracking
      • Email views and clicks
      • Tracking API
      • Event rules
      • Activity analyzers
    • Bulk processing
      • Imports
        • User activities import
        • User profiles import
        • User choices import
        • Segments import
      • Deletions
        • User identifiers deletion
        • Device points deletion
        • User points deletion
      • User identifiers association
      • Integration batch
    • Activities analytics
    • Data warehouse
      • Preliminary setup
        • BigQuery
      • Create data warehouse
  • Querying your data
    • OTQL queries
    • OTQL examples
    • GraphQL queries
    • UserPoint API
    • User activities
    • Activities analytics queries
      • API Quickstart
      • Dimensions and metrics
      • Use cases
    • Funnel API
  • Alerting
    • Alert configurations
  • Data visualisation
    • Quickstart
    • Dashboards
    • Sections and cards
    • Charts
    • Datasets and data sources
      • Using a data file data source
    • Transformations
    • Filters
    • Cookbook
    • Reference
  • Advanced usages
    • Audience segmentation
      • Audience features
      • Segment builders
      • Audience segment metrics
      • Audience segment feed
        • Building new feeds
        • Monitoring a feed
        • Curated Audiences (SDA)
      • Edge segments
      • Cohort-based Lookalike
    • Contextual targeting
      • Setup
      • Activation
        • Google Ad Manager
        • Xandr (through prebid.js)
      • API documentation
    • Exporting your data
      • Query Exports
      • Datamart replication
    • Data privacy compliance
      • User choices
      • Cleaning rules
      • Exercise of user rights
      • Cookies
    • Campaigns
    • Automations
      • Email routers
      • Email renderers
      • Opt-in provider
      • Custom action plugins
      • Usage limits for automations
    • Plugins
      • Concepts
      • Creation & Deployment
      • Coding your plugin
      • Manage existing plugins
      • Layouts
      • Presets
      • Monitoring
      • Throttling
      • Batching (for external feeds)
    • Platform monitoring
      • Resources usage
        • Dimensions and metrics
      • Collection volumes
        • Dimensions and metrics
      • Events ingestion monitoring
        • Dimensions and metrics
    • Data Clean Room
      • Bunker
      • Clean room
  • Resources
    • Tutorial: Data Ingestion
      • Your first events
        • Add the mediarithmics tag
          • Getting the tag
          • Adding the tag
        • Send events using the tag
          • Adding event properties
          • Finding the UserEvent type in your schema
          • Matching your schema
          • Standard events
      • Your first bulk imports
        • API basics
          • Authentication
          • Your first API call
        • Send documents using the API
          • Requirements
          • Sending documents
    • Using our API
      • Authentication
    • Tools & libraries
      • mics CLI
      • JS Tag
      • Plugin SDK
    • Data cubes
      • Creating a report
      • Reference
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Resources
  2. Tutorial: Data Ingestion
  3. Your first events
  4. Send events using the tag

Matching your schema

Now that we've found the UserEvent type, we have to look at the properties it has.

In our example, there are only 3 properties: id, timestamp and name. id and timestamp will be autogenerated by the system, so the only info we can add is the name. That's what we do when we send a event this way:

mics.push("my-event-name");

But now let's consider that we've added some properties to our schema. For instance, when a user gets to the cart page, I want to track the items which are in his/her cart. Each item will have a brand name and its own name.

Your UserEvent type should look something like this:

type UserEvent  {
    id:ID! @TreeIndex(index:"USER_INDEX")
    ts:Timestamp! @TreeIndex(index:"USER_INDEX")
    name:String! @TreeIndex(index:"USER_INDEX")
    items:[Item!]
}

type Item  {
    id:ID! @TreeIndex(index:"USER_INDEX")
    brand:String! @TreeIndex(index:"USER_INDEX")
    name:String! @TreeIndex(index:"USER_INDEX")
}

Now if you want to send this information along with your event, you have to match the structure of your schema, the name of your event being the 1st parameter in the push method, and the 2nd parameter containing all non system-generated properties (remember: UserEvent id and timestamp will be autogenerated).

mics.push("cart-view", {
    "items": [
        {
            "brand": "brand name 1", 
            "name": "product name 1",
            "id": 1
        },
        {
            "brand": "brand name 2", 
            "name": "product name 2",
            "id": 2
        }
    ],
});
PreviousFinding the UserEvent type in your schemaNextStandard events

Last updated 4 years ago

Was this helpful?