single-page-application

Google analytics (via tag manager) loses track of adwords visitors after first pageload

送分小仙女□ 提交于 2019-12-04 11:54:08
问题 I am experiencing a very strange problem with Google tag manager (GTM), Google analytics (GA) and Google adwords. So far I am getting nowhere with solving it. The setup: We have a singe page application (backbone and marionette) and we are using GTM to push virtual pageviews to GA using standard dataLayer.push events (and also e-commerce events if this is relevant). This setup generally works fine. The problem: The problem is users coming from adwords, with a gclid tag. The first pageview for

Enable google analytics for single page site with # views

妖精的绣舞 提交于 2019-12-04 09:59:26
问题 I've read the similar questions, but my question is slightly different. I am implementing a single page registration processing page for a site using Kendo UI. The site has 4 pages which was generated dynamically when user clicks menu tabs. For example, when user clicks tab1 on the menu, then tab_1 would be injected into app_container container. templates as below: <div id="app_container"></div> <script id="tab_1" type="text/x-kendo-template"> //first page </script> <script id="tab_2" type=

How to open a new tab with router.navigate in TypeScript

南楼画角 提交于 2019-12-04 08:02:52
The following typescript code will always open in the current browser tab navigate($data: menuItem, $event: JQueryEventObject) { //... let a = $event.currentTarget as HTMLAnchorElement; router.navigate(a.href); } How do I make router.navigate open in a new tab ? (that is when $event.ctrlKey is true) Yes, as you @Daneille commented, you have to handle by your own way since durandal's router plugin ( navigate function) does not provide a way to open a new tab. So it is better to handle something as you commented. if ($event.ctrlKey) { window.open(url); } I think it is better to do in HTML link

Authentication on angular spa using msal.js

不想你离开。 提交于 2019-12-04 06:01:20
my angular app has 1000s unique routes and users should be able to click on login button from any of those pages. Have implemented msal.js basing on this sample : https://github.com/Gimly/simpleAngularAzureB2C/blob/master/src/app/authentication.service.ts I am getting following error when calling login method: AADB2C90006:+The+redirect+URI+' http://localhost:39579/unique-uri '+provided+in+the+request+is+not+registered+for+the+client+id+ Is there a way to get around this? Thanks! By default, the Msal.UserAgentApplication constructor sets the "redirect_uri" request parameter to the current URL,

What happens when you enable the html5 mode in mode in angularjs?

ε祈祈猫儿з 提交于 2019-12-04 05:57:20
问题 What actually happens when you enable the html5 mode ? This might go back to the point how routing takes place in single page applications What I perceived before(it may be wrong) : Looking at the dirty url in the angularjs application I always assumed it being url fragment to which different views are bind for different fragments. So in short we already have all the pages and a particular fragment is being displayed for a particular url . Now in order to remove the hash you have to set

Is it possible to hide URL bar in iOS 9 (Safari browser) by using JavaScript?

落花浮王杯 提交于 2019-12-04 03:59:16
问题 I want to hide the URL bar from my single-page application by using JavaScript. I tried to set bigger height of the 'body' element and then perform: window.scrollTo(0, 0); But it doesn't work. The URL bar is still visible. How do I solve this problem? 回答1: For iPhone, you can make your content just one pixel higher than the viewport, that will eliminate the navbar. Working code example: http://pastebin.com/16s8Xvbw Caveats: Only works in landscape, and when flipping from portrait to landscape

Cancel route using Sammy.js without affecting history

a 夏天 提交于 2019-12-04 03:40:29
I want to intercept all route changes with Sammy to first check if there is a pending action. I have done this using the sammy.before API and I return false to cancel the route. This keeps the user on the 'page' but it still changes the hash in the browsers address bar and adds the route to the browsers' history. If I cancel the route, I dont want it in the address bar nor history, but instead I expect the address to stay the same. Currently, to get around this I can either call window.history.back (yuk) to go back to the original spot in the history or sammy.redirect. Both of which are less

How to approach “end-client” performance testing on single-page (web) applications?

旧城冷巷雨未停 提交于 2019-12-04 02:55:15
We are evaluating how to test performance on a single-page application ( SPA ) which relies heavily on JavaScript and dynamic content (updated via Ajax). Popular load-testing tools like Apache JMeter or Gatling are able to generate huge loads with little hardware by sending HTTP requests. But they do not process any Javascript code. We would like to measure performance as perceived by the client, that is, as perceived by end-user sitting in front of a browser (with all the rendering and JavaScript overhead included). We have the following alternatives in mind: Use Selenium Grid to run a test

Bugs in Sidebar Menu with React Router V4

↘锁芯ラ 提交于 2019-12-04 02:03:38
I'm developing a single-page ReactJS Web app but I know I'm doing something wrong while defining my routing with React Router V4 . My problem is as follows: PrivateRoute in my routes.js file is not working as expected. That is, I don't know why but my sidebar menu, which is a child component of my main App , does not work properly: there are a few bugs when I click on the menu item of my PrivateRoute component (in this case, Page1 ). When I say bugs, I mean that when I click on the menu item of a PrivateRoute , the sidebar menu is misconfigured. The content of the component ( Page1 ) is

Vue.js computed property not updating

早过忘川 提交于 2019-12-04 02:00:49
I'm using a Vue.js computed property but am running into an issue: The computed method IS being called at the correct times, but the value returned by the computed method is being ignored! My method computed: { filteredClasses() { let classes = this.project.classes const ret = classes && classes.map(klass => { const klassRet = Object.assign({}, klass) klassRet.methods = klass.methods.filter(meth => this.isFiltered(meth, klass)) return klassRet }) console.log(JSON.stringify(ret)) return ret } } The values printed out by the console.log statement are correct, but when I use filteredClasses in