Posts: 18
Registered: ‎03-09-2017

Re: tracking virtual pages - work with VPageView

let's continue in the other topic/question for the case of errors :)

Posts: 18
Registered: ‎03-09-2017

Re: tracking virtual pages - work with VPageView


 that makes sense, thanks, I'll try it .. and it might be answer for this question too


one more thing, we have disabled tracking of base pages (we have single page application in React), what should I set into the parent then? VirtualPage? even if this object might have been 'ended and reported' already? or should I do something like this? but it will probably create new vPage hit, right?

function report(msg) {
 const vPageView = new{url: url});

 var errorm = new;

Posts: 20
Registered: ‎03-09-2015

Re: tracking virtual pages - work with VPageView

Hi Jakub,


If you don't explicitly set the end() marker, it will still go ahead and send the metrics without the Page Load Time (PLT metric), however the EUM server will reject the report as this is a mandatory metric. You should see something like this in the DroppedBeacons.log:

31 Mar 2017 02:28:01.263 -0700  Beacon to Record Converter-7  DroppedBeacon              INFO    appKey=EUM-AAB-BEY, recordType=BROWSER, validationType=INSUFFICIENT_DATA_METRIC, agentVersion=null, message=VIRTUAL_PAGE, Mandatory metric [PLT] not available : {"eg":"2","et":3,"eu":"5/6#7","ts":1490952479169,"mg":"0","au":"1://2/3/4","at":0,"ud":{"d1":"v1","d2":"v2","d3":"v3"},"mx":{"DDT":80,"DRT":421,"DPT":341,"DOM":421,"PLC":1},"si":227}

When you create a new tracker, it will be a different session being reported, hence it wont build on the old in-complete session.


The mandatory metrics for Virtual Pages is the Page Load Time (PLT) which is marked by the end() call. Another mandatory metric Page Load Count (PLC) is calculated automatically and is included in the metrics automatically.


I am not sure I understood the question about Error trackers being xhr correlated. The Error tracker is to report error for the base page if  the parent object is not set. If the parent is set to a particular object tracker (ajax, virtual page, etc) it will be reported for that object.


eg If you report something like:

		var ajaxT = new;
		// set url
		ajaxT.url('something loaded');
		// mark timings
		var errorm = new;
		errorm.msg("test message123");

You would see the error in the browser snpshot as:

Screen Shot 2017-03-31 at 3.11.16 AM.png


Let me know if this answers your question.

Posts: 18
Registered: ‎03-09-2017

Re: tracking virtual pages - work with VPageView

and here's another example of UC, which might be quite common and we would like to track it .. when user navigates to some page and while the page is loading, he will navigate away again ..


something like this?


var tracker ={url:"some url"})




Posts: 18
Registered: ‎03-09-2017
Accepted Solution

tracking virtual pages - work with VPageView

[ Edited ]

I'd like to clarify expected use cases, how we should work with VPageView tracker object for transition between 2 virtual pages:

according to the example down here, the use case could be:


  1. instantiate object: 
    var tracker ={url:"some url"});
  2. start tracking (marks the starting time) .. latest version of code calls this from the constructor, so this might be optional?

  3. do the transition, page content loading etc .. use mark* setters for different phases if we need more granularity
  4. end the tracking by
  5. send the result into AD:;

do I have to finish the whole scenario? for example what happens, if I call only start() and then send it to AD? and then later create new tracker (for the same url), call end() on it and send it again? which setters on the tracker object are 'necessary'? do I have to pass URL in the constructor (as it's in the example), or not (as it's in the middle of the page)?

are the Error tracker objects also 'xhr correlated'? if so, where is this relation stored? for example if user is working in multiple tabs ..

thanks for clarifying this, I haven't seen the answers in the documentation ..