You can launch in-page events with N.rich Website Tag. After installing the Tag the nt
function can be used to emit custom events. This function will be available on any page including N.Rich Website Tag and may be called anywhere on the page once the page has loaded.
The function supports three parameters: eventCategory
, eventAction
and eventLabel
in the configuration object and the values of the parameters may be defined by the user. Any other parameters will be omitted. Example:
nt('send', 'event', {
eventCategory: 'Outbound Link',
eventAction: 'click',
eventLabel: 'advertising click'
});
eventCategory
, eventAction
and eventLabel
can be any string value, but there is some limitations:
-
eventCategory
andeventLabel
will be trimmed to 75 characters if exceeded, bounding spaces will be removed. -
eventAction
will be trimmed to 50 characters if exceeded, bounding spaces will be removed.
Every the time function will be called it will generate a new event in the statistics. The event will be saved within N.Rich analytics system to the table main_stats_final_v6
with event_name='PAGE_EVENT'
and can be used in the various dashboards.
Examples of events:
nt('send', 'event', {
eventCategory: 'Remarketing',
eventAction: 'purchase',
eventLabel: '$50.34'
});
nt('send', 'event', {
eventCategory: 'Engagement',
eventAction: 'page viewed',
eventLabel: 'Discounts page'
});
nt('send', 'event', {
eventCategory: 'Engagement',
eventAction: 'Scroll',
eventLabel: 'half page scrolled'
});
nt('send', 'event', {
eventCategory: 'Engagement',
eventAction: 'Video view',
eventLabel: '20 seconds viewed'
});
nt('send', 'event', {
eventCategory: 'Link action',
eventAction: 'click',
eventLabel: 'Ref to buy clicked'
});