# Newbie Question (Real user monitoring): how do I track browser and device origin?

**URL:** <https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643>\
**Category:** APM\
**Tags:** rum\
**Created:** [April 26, 2019, 12:13pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643 "2019-04-26T12:13:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit\_e](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@amit\_e](https://discuss.elastic.co/u/amit_e)\
**Post date:** [April 26, 2019, 12:13pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/1 "2019-04-26T12:13:10Z")

</div>

I gave just got myself a paid elasticsearch account and installed RUM on my website (ref: [https://www.elastic.co/blog/performing-real-user-monitoring-rum-with-elastic-apm](https://www.elastic.co/blog/performing-real-user-monitoring-rum-with-elastic-apm)).

I now want to track custom events on my 4-step registration form. What I want to do is discover and aggregate user events by a) the browser my users are using and b) the mobile device they are using

Are these event sources available to me via the RUM setup? Or do I have to somehow send them to elastic search and apm?

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [April 26, 2019, 12:49pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/2 "2019-04-26T12:49:33Z")

</div>

Hi,

Welcome to the forum and thanks for using Elastic APM.

Currently to capture form events you should instrument your application with [Custom Transactions](https://www.elastic.co/guide/en/apm/agent/js-base/current/custom-transactions.html) in other words you should create a custom transaction when each step is submitted. Please see the linked documentation page for more detail.

For the browser and device information we capture raw `User-Agent` header, however this field needs to be parsed further to show human readable values. At the moment you should add [user agent processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.0/user-agent-processor.html) to parse this field. But we also have [an issue](https://github.com/elastic/apm-server/issues/1972) open to enable this processor on the APM server by default.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![amit\_e](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@amit\_e](https://discuss.elastic.co/u/amit_e)\
**Post date:** [April 29, 2019, 3:24am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/3 "2019-04-29T03:24:18Z")

</div>

Thanks for that reply @Hamidreza. I think I understood the first part and can go ahead with instrumenting it in my app.

The second part is however, quite unclear. I don't have my own server (it's a frontend react app sitting in an s3 bucket) - only an elasticsearch cloud account. So how and where do I add a pipline with processors? Could you please guide me.?

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [April 29, 2019, 8:52am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/4 "2019-04-29T08:52:01Z")

</div>

> [@amit\_e](#):
>
> Thanks for that reply @Hamidreza. I think I understood the first part and can go ahead with instrumenting it in my app.

Hi,

You should add the [user agent processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.0/user-agent-processor.html) to your elasticsearch instance on the cloud. However you can do that through Kibana console. Here is an example that you can run in the Kibana console (I've updated the example to reflect APM server version 7.0 fields):

```auto
PUT _ingest/pipeline/user_agent
{
  "description" : "Add user agent information",
  "processors" : [
    {
      "user_agent" : {
        "field" : "user_agent.original"
      }
    }
  ]
}

```

Please also add the pipeline to the [APM Server configuration](https://www.elastic.co/guide/en/apm/server/current/configuring-ingest-node.html#apply-pipelines)

```auto
output.elasticsearch:
  pipelines:
  - pipeline: "user_agent"

```

Update:  
If you don't need to customise the user agent processor you can set [register.ingest.pipeline.enabled](https://www.elastic.co/guide/en/apm/server/6.5/configuration-process.html#register.ingest.pipeline.enabled) to `true` in APM server configuration so that it would create a default processor and use it for the ingestion.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![ariel\_k](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@ariel\_k](https://discuss.elastic.co/u/ariel_k)\
**Post date:** [May 1, 2019, 7:05pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/5 "2019-05-01T19:05:09Z")

</div>

Hi @Hamidreza,  
i wanted to know how to set register.ingest.pipeline.enabled if i use the cloud service and have no access to the .yml files ?

thanks ,  
Ariel

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [May 1, 2019, 7:50pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/6 "2019-05-01T19:50:40Z")

</div>

Hey @ariel_k, better to open a new discuss topic in the future. On cloud, you have access to the apm-server configuration via `edit` under your deployment - [this guide](https://www.elastic.co/guide/en/cloud/current/ec-manage-apm-settings.html) provides step by step instructions. Once you've navigated there, add these user settings overrides:

```auto
apm-server.register.ingest.pipeline.enabled: true
output.elasticsearch.pipelines:
- pipeline: "apm_user_agent"

```

It look like this in the UI:

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/0/30a92c3cfeaf6701d454e2c7d3a3905930929ea0.png)

---

<div class="post-metadata">

**Author:** ![ariel\_k](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@ariel\_k](https://discuss.elastic.co/u/ariel_k)\
**Post date:** [May 2, 2019, 6:04pm UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/7 "2019-05-02T18:04:14Z")

</div>

Thank you very much. seems like its working 🙂

---

<div class="post-metadata">

**Author:** ![anushshukla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anushshukla/32/46173_2.png) [@anushshukla](https://discuss.elastic.co/u/anushshukla)\
**Post date:** [May 6, 2019, 7:46am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/8 "2019-05-06T07:46:51Z")

</div>

Hi @gil,

Currently I am logged in to the Elastic Cloud account where APM, ElasticSearch and Kibana server setup is present. Where is this apm-server.yml file exaclty present.

Before helping out, please note we have added APM RUM in our frontend applications which is build upon ReactJS.

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [May 6, 2019, 11:13am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/9 "2019-05-06T11:13:51Z")

</div>

Hi Anush,

Welcome to the forum.

On cloud, you can't directly edit the apm-server.yml file, instead there's an APM configuration section in the `edit` view of your deployment, you can override some of the APM server config options by expanding "User setting overrides" (please see the above screenshot).

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![anushshukla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anushshukla/32/46173_2.png) [@anushshukla](https://discuss.elastic.co/u/anushshukla)\
**Post date:** [May 9, 2019, 6:59am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/10 "2019-05-09T06:59:51Z")

</div>

> [@Hamidreza](#):
>
> dit the apm-server.yml file, instead

Got it. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 30, 2019, 2:59am UTC](https://discuss.elastic.co/t/newbie-question-real-user-monitoring-how-do-i-track-browser-and-device-origin/178643/11 "2019-05-30T02:59:57Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
