JavaScript Reference

Understanding event tracking

EventNative's JavaScript snippet can work in two modes:

  • Direct tracking pixel: You'll need to call event native explicitly in this case.

  • Intercept Mode: We capture events from 3rd-party systems (GoogleAnalytics or Segment) if you have them installed. After inserting one line of JavaScript, EventNative will automatically intercept events and send them to your desired destination. Your original event pipeline will not be disrupted.


The quickest way to get started with JavaScript integration is two open page at your instance of EventNative: https://[your-instance]/p/welcome.html and use tracking code builder:

Check Google Analytics Interceptor or Segment Interceptor if you want EventNative to listen to 3rd-party events. Check Send Data Directly otherwise. Do not forget to change API_KEY to key configured previously.

Make sure that the code inserted after GA and Segment code if it's working as an interceptor.

Add eventN.track('pageview') if you're sending events directly. See Tracking API reference

Further reading