dev@readymag$ warning
For users with professional web development experience.
Be careful if you aren’t sure of something.
This feature can be added only by request.
It does not come included with any of our paid plans.
We send data about all interactions within a project to your Google Analytics property by default. Also, you can add other analytics trackers and specify which events will be sent to them using their API calls.
Add custom tracker
Follow the instructions of the analytics service of your choice to obtain its tracking code. Usually the code should be placed into the <head> section.
See Code Injection.
Set up API calls to track events
The global object RM.customAnalyticsHandlers contains two arrays:
- RM.customAnalyticsHandlers.event—the array of functions that handle the events on pages. Each time a visitor triggers an event on a page all the functions in this array are executed.
- RM.customAnalyticsHandlers.track—the array of functions that handle transitions between pages. Each time a visitor goes to another page in a project all the functions in this array are executed.
Functions added to the arrays are called with an object containing tracking parameters in a format that Google Analytics accepts. Modify the object according to the specifications of your analytics tool and send it using its API call.
Example
Let’s say we are using Kissmetrics in addition to Google Analytics. Here’s a piece of code that sends data to our Kissmetrics account every time visitors submit a form on the page ‘/5’:
In addition, we would like to track visits to the pages ‘/contact’ and ‘/buy’: