JQM & SPA support?
Hi all,
1. Does Omniture support jQueryMobile and Single Page Application, and how to do it?
I already have omniture and implemented the trackAction, trackState, and tracktime in iOS native app.
For web SPA, I can only do the trackAction, but to track state, In theory I should put some javascript code snippet on each apge I want to track, but there is only one page for the whole web app. How to do it?
2. Sometimes the request for trackAction will be canceled, and I can't get the specific reasons(This issue has been updated but still haven't got an solution).
We have a link like below:
<a href="mailto:test@gmail.com&subject=test" onClick="var s=s_gi('wfbmobileappdev'); s.linkTrackVars='contextData.wfi.shareType,contextData.wfi.shareEvent'; s.contextData['wfi.shareType'] = 'Test'; s.contextData['wfi.shareEvent'] = '1'; s.tl(this,'o','Sharing Action')">Test</a>we invoke the email client by using the syntax href="mailto:...", but this will cause to cancel to send the trackAction data and we haven't known the specific reasons. You can find there are 2 request when clicking the menu item 'Article Feedback', the first request is used to send data to omniture server but it's canceled:
[img]2014-02-12_142618.png[/img]
Once the request is canceled, it will not send any request again even we do anything.
But if I modify the href="gmmmailto:..." into href="#" for testing, there will be only the measurement request and the Status is 200(OK).
[img]2014-02-12_143422.png[/img]
[update-02/20/2014]
Thank Alexis Cazes, I've got an progress for the 2nd issue. There are 2 reasons:
1. I don't know why there are different between putting the functional code into onClick attribute and encapsulating a new method. It can't work by putting the code into OnClick attribute, but work well by encapsulating a new method.
2. I set some attributes(s.trackDownloadLinks, s.trackExternalLinks, s.trackInlineStats) false to prevent the default track link before(To know why to do this, please refer the 3rd issue). So if I reset these attributes true, and the image request will be sent successfully, but it will send request when I click any link and this is not what I want to see. So I get a new problem below:
3. How to prevent the default click event monitor in AppMeasurement.js?
When I include the AppMeasurement.js & VisitorAPI.js into the web app, no matter what link to click, it still send an image request to omniture server and this is not what I want to see, I just want track only one of them by manual. I thought the solution is to set some attributes(s.trackDownloadLinks, s.trackExternalLinks, s.trackInlineStats) false. But If I do this, it will re-back to the 2nd issue...
PS: I've modified these 2 files according to the JavaScript Implementation Steps.
[update-03/04/2014]
Thank André, I've got the solution to prevent the default click event monitor according to your advice. I'm using s.linkInternalFilters="javascript:,http" to prevent all the click event, document.domain is not enough in our case, and it will also prevent the event for sending email.
So the issue 2# and 3# have been fixed.
Thanks Alexis Cazes and André again.