Analyze Client-Side Events in New Relic Insights with Browser Instrumentation
Join the DZone community and get the full member experience.Join For Free
[this article was written by ankush rustagi]
what is browser instrumentation and why is it useful?
we added this capability to new relic insights to expand the kind of data you can analyze from new relic browser. to use this new feature set, you need to have an insights pro account, whether on a trial basis or as a paid user. you will also need to have a website or app with new relic browser installed. you can install the browser agent via a new relic apm agent , or by copying and pasting a code snippet into your html .
why this feature may matter to you:
- you can’t install the apm agent on your servers due to cdns, virtualization, etc., but you want to have visibility into user engagement and add custom business information via custom attributes.
- you want visibility into engagement with features that load data asynchronously or features that don’t cause a page load or server side transaction (video plays and pauses, clicks that open a modal, hover states, etc.).
- you can’t measure engagement effectively in your single page app (angularjs, ember.js, etc.).
- you want to see the frontend click-level engagement and server-side transactions in a single view.
the release of browser instrumentation includes:
- a new pageaction event in new relic insights for any of your instrumented events, which also has new default attributes, such as referrer url, current url, browser width and height, and time since page load.
- for more detailed information, check out our documentation .
some interesting use cases from our beta testers
as we have spoken with our customers throughout the beta testing period, we have seen a variety of different use cases as they played around with the new feature. below are a few sample use cases to understand the various ways in which this feature has expanded analysis capabilities within new relic insights.
e-commerce checkout flows
analyzing steps throughout the checkout process is a common practice for e-commerce companies. but one e-commerce company wants to know how long it takes for its users to complete each specific step, which gets complicated when there are multiple actions that occur on the same page as each user goes through the process. some questions the team has include:
- how long is each individual step for the user?
- how long does it take between landing on a page to filling out the first step?
- how long until the user clicks “next”?
- what does the funnel look like from checkout through each individual step, not just each page in the flow?
the company has found the answers to these questions by instrumenting several pageactions on its website to assess checkouts. now that it can see how long users take to check out, the company has a better understanding of what constitutes a successful conversion, which has allowed it to improve and increase conversion events on the site.
video engagement at media companies
a digital media company embeds videos on its website, to which it drives user traffic. the company knows that engaged users typically watch at least 50% of a video. via new relic insights pageviews, it can see that users are viewing the videos, but without being able to instrument the embedded video player, it cannot see when the users click pause or when they watch 50% of a video.
optimizing “learnboarding” at a saas company
now the company instruments the learnboarding steps via the insights js api, which has allowed it to see which users have successfully completed the process and which haven’t. this has enabled the company to reach out to those users who didn’t finish and proactively ensure that they’ve received the onboarding and training they need to be successful in adopting the saas product.
how to get started
as demonstrated in the examples above, browser instrumentation can give you a powerful, new way to instrument and collect your data in new relic insights. it fills an important and meaningful need of our end users to get more detailed metrics from the client side of their applications.
you will need new relic browser installed on an app (even as a browser lite user) and new relic insights pro (either trial or paid) to access this feature set. if you are an existing lite or paid customer without access to insights pro, please contact a sales rep so they can provision you a pro trial. for new users, you can initiate an apm pro trial and get an insights pro trial as well.
Published at DZone with permission of Fredric Paul, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
How To Become a 10x Dev: An Essential Guide
Working on an Unfamiliar Codebase
The Role of AI and Programming in the Gaming Industry: A Look Beyond the Tables
How To Use Pandas and Matplotlib To Perform EDA In Python