I am installing @snowplow/react-native-tracker@0.1.6 in one of the existing application. While installation I am getting below messages.
npm WARN @snowplow/react-native-tracker@0.1.6 requires a peer of react-native@>=0.59.8 but none is installed. You must install peer dependencies yourself. npm WARN @snowplow/react-native-tracker@0.1.6 requires a peer of react@>=16.8.6 but none is installed. You must install peer dependencies yourself.
@snowplow/react-native-tracker@0.1.6
added 17 packages from 14 contributors, removed 17 packages, updated 140 packages and audited 157 packages in 18.23s
Above message says, react-native@>=0.59.8 and react@>=16.8.6 are dependent libraries. Does this need to be installed or this can be ignored still and this will not affect the functionality of @snowplow/react-native-tracker@0.1.6.
I followed below procedures to install react-native-tracker
npm install @snowplow/react-native-tracker --save
npm WARN @snowplow/react-native-tracker@0.1.6 requires a peer of react-native@>=0.59.8 but none is installed. You must install peer dependencies yourself.
Tried installing react-native (command: npm install react-native@>=0.59.8 --save) this downloads and install react-native@0.64.0 and below WARN is shown.
npm WARN react-native@0.64.0 requires a peer of react@17.0.1 but none is installed. You must install peer dependencies yourself.
@Colm , This is web application, frontend in ReactJS. The goal is to track button (toggle-buttons) click events and link click events, will this events can be tracked through browser tracker?, it could give me some light if you share some example on tracking toggle-button-events and link-click-events
-Thanks
I don’t think there’s a plugin for buttons specifically as far as I’m aware - typically you’d add in event listeners or use a Tag Manager (such as Google Tag Manager) to listen to these events and dispatch Snowplow events. It is of course possible to write a plugin (in the new tracker) that does this automatically but at the moment that isn’t built into the core (to keep the Javascript snippet light).
@Colm , @mike , I installed the plugin for link-click-tracking and included below code in react file. but I could only see ‘e=pv’ but not ‘ue’. Please suggest what configuration I am missing here to get eventType as linkClick (ue).
import { setUserId, newTracker, trackPageView } from ‘@snowplow/browser-tracker’;
import { LinkClickTrackingPlugin, enableLinkClickTracking } from ‘@snowplow/browser-plugin-link-click-tracking’;
That all looks ok to me. We’ve just published v3.0.3 which has a fix for link click tracking in it, it’s unlikely the be the problem here as it is quite the edge case but worth upgrading just in case.
As for secure tracking in v3, you now specify https on the endpoint - forceSecureTracker has no effect.
Everything else seems fine from that snippet, just beaware that middle clicking a link might not work unless you enable pseudo clicks: enableLinkClickTracking({ trackContent: true, pseudoClicks: true }); and it only works on <a> tags, for other types of click events you’ll need to build your own event handler and track your own custom events.
I updated brower-tracker to v3.0.3 and added pseudoClicks to “enableLinkClickTracking({ trackContent: true, pseudoClicks: true })” and passing the argument eventMethod as ‘get’ is not seeting the app-id and user-id even if calling setUserId method. In what way app-id and user-id can be set.
Note: By changing ‘get’ to ‘post’ then in the debugger it is setting the app-id and user-id that I mentioned in tracker.
Please suggest the way to set it for ‘get’.