Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 860 Bytes

File metadata and controls

25 lines (16 loc) · 860 Bytes

Home > @snowplow/react-native-tracker > getWebViewCallback

getWebViewCallback() function

Enables tracking events from apps rendered in react-native-webview components. The apps need to use the Snowplow WebView tracker to track the events.

To subscribe for the events, set the onMessage attribute: <WebView onMessage={getWebViewCallback()} ... />

Signature:

export declare function getWebViewCallback(): (message: {
    nativeEvent: {
        data: string;
    };
}) => void;

Returns:

(message: { nativeEvent: { data: string; }; }) => void

Callback to subscribe for events from Web views tracked using the Snowplow WebView tracker.