Skip to content

Web and Mobile Events Best Practices

Events tell FirstHive what customers do on your website and apps. They power real-time journeys, experiences, segments and conversion tracking, so getting them right matters.

Start with an event plan

Before you add any tracking code, write down:

  • The questions you want to answer and the journeys you want to trigger, for example cart abandonment or a quote started but not finished.
  • The events you need for those, and no more. Most businesses need 10 to 25 key events.
  • The properties for each event, with their type and an example value.
EventWhen it firesKey properties
product_viewedA product page loadsproduct_id, category, price
add_to_cartAn item is added to the cartproduct_id, quantity, price
checkout_startedThe checkout page loadscart_value, item_count
purchaseThe order is confirmedorder_id, total_amount, currency
signed_upAn account is createdmethod

See Understanding Events in FirstHive.

Name things consistently

  • Use one naming style everywhere, for example lower-case object_action: cart_viewed, quote_started.
  • Use the same event name on web and app for the same action, so segments and journeys work across both.
  • Keep property names and types the same across events: product_id is always a string, price always a number.
  • Don’t put values in event names: use category_viewed with a category property, not shoes_viewed.

Identify users

  • Call identify when the customer logs in or signs up, with the same customer ID you use in your other data. This links their anonymous browsing to their profile.
  • Send email or mobile number with identify only where you have consent to.
  • Reset on logout on shared devices so the next person’s activity isn’t added to the wrong profile.

Website tracking

Mobile app tracking

  • Integrate the Android, iOS or React Native SDK, and add push credentials if you’ll send push notifications.
  • Track screen views and the same key events as the website.
  • Ask for notification permission at a useful moment, not on first launch.
  • Set up deep links so push notifications and experiences can open the right screen.

Test before launch

  1. Use a test account and perform each tracked action.
  2. Check that each event arrives with the right properties, using Real-Time Reports and the Visits Log.
  3. Log in and check the events appear on your test customer profile.
  4. Recheck tracking after every website or app release.

Common mistakes

MistakeEffectFix
Different event names on web and appJourneys and segments miss customersUse one event dictionary.
No identify on loginBehavior stays anonymousCall identify with the customer ID.
Prices sent as text, such as “$1,299”Filters and revenue don’t workSend numbers, with currency in its own property.
Tracking every clickNoisy data, hard to useTrack the actions that matter.