I've got a React app using GTM...
I've got an dataLayer.push({'event': 'linkClicked'});
The first time I click the link, no event is emitted. Any other clicks, and the event is emitted.
I've confirmed via the chorme JS debugger and GA Debugger that
the push code is getting hit every time
the event gets emitted every time but the first time.
I can see the first and any subsequent events appear in the dataLayer. But the GA Debugger only shows the the subsequent events...as does the real time Analytics..
Alternatively...I suppose the event push could be one behind, but that doesn't seem to be the case.
Anybody seen this before?
Related
I am facing an issue, while trying to start a phone call from my iOS app using:
UIApplication open(_:options: completionHandler:)
iOS shows an confirmation popup/alert before starting the call with two button Call & Cancel and CompletionHandler called with a Bool parameter having true/false based on button action in iOS 10.
But now in iOS11 the problem is that the completionHandler is being called automatically before tapping on "Cancel" or "Call" button of confirmation popup, always having true value.
Is this a bug in iOS11 or is there something that I am doing wrong?
There has been a behavior change in when the closure is called in iOS 11. I cant say if this behavior will be reverted or if this is a bug.
But one of the ways you can identify when the user interacted with the popup is by adding a notification listener around UIApplicationDidBecomeActive in the completion closure of openURL(). To identify whether the call was clicked or not you will need to create another custom notification and listener on the CTCallCenter. That was the best way through which I was able to identify it, there might be better solutions though :D
completionHandler will get a call if your given URL gets open success or failure, this has nothing to do with Cancel & Call buttons on Alert
see what Apple docs has to say about it HERE
completionHandler
The block to execute with the results. Provide a
value for this parameter if you want to be informed of the success or
failure of opening the URL. This block is executed asynchronously on
your app's main thread. The block has no return value and takes the
following parameter:
success
A Boolean indicating whether the URL was
opened successfully.
I have a $http.put function that updates my database, this happens on a button click. After I update the database once, and stay on the page, with no interaction at all the update function gets called and will update the database with the last information that was inputted.
I've triple checked my code, there is only one occurrence of my update function being called. And the $http.put is inside $scope.update that is an anonymous function that calls the $http.put.
If I update information and then leave the page, and then come back the function does not fire on it's own.
Here is my Github for the project. I will pull out any specific code that you want to see, but I'm not sure what to show because there are 4 files involved. Those files are
(client/scripts/app.js)
(routes/products.js)
(public/views/routes/adminIndex.html)
(public/views/routes/modProduct.html)
Code is Here
Add a console.trace() just before the $http call to see what is calling it.
You can also use the developper console of your browser and add a breakpoint that will stop the code execution and let you inspect everything (stack trace, current context, etc). Chrome is particularly good at that.
I've added an event handler for the LoadedContent event. I'm a bit surprised that the event seems to fire multiple times for a page during a single load. Why does that happen?
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
ServiceLocator.Current.GetInstance<IContentEvents>().LoadedContent += this.EPiServerApplication_LoadedContent;
}
EDIT
I'm using EPiserver 8.
With "a singe load" I mean going from DOPE mode to edit mode for a page that is a child but has no children. Last time I counted the event fired 17 times for that page.
The LoadedContent event is fired every time Get/TryGet on the IContentLoader (or IContentRepository) is called. This happens regardless if the data is loaded through from the cache or from the database.
As these APIs are used by many separate code branches, especially in edit mode, this event will be triggered multiple times just as you have found. Normally this should not be anything that you need to be worried about unless of course you are doing something resource intensive in your event handler.
I am facing a strange issue with keyboard event handling. I am able to use keyboard event on my screen for the first event. However, when I try for the second event it fails to execute.
e.g. For zoom, Ctrl+1 works only for the first time. Same happens when I try using some other event after the first one.
Note: It works absolutely fine if I use mouse events for above actions.
I am using
Actions action = actions.sendKeys(Keys.CONTROL, Keys.NUMPAD1);
action.perform();
I don't know how but when i when used "send keys" command two times and "perform "once it started to work.
However, this has happened with few keyboard events. Others work with single usage of send keys.
Actions action = actions.sendKeys(Keys.CONTROL, Keys.NUMPAD1);
Actions action = actions.sendKeys(Keys.CONTROL, Keys.NUMPAD1);
action.perform();
I have an apex page which relies heavily on rerendering certain parts of the page. The issue is that when I click on a commandbutton, normally it calls its action method, and rerenders a part of the page, however, it only works about half the time. On the other occasions the action method does not fire. (Something still happens, because it creates a debug log)
The confusing thing about it is that it happens seemingly randomly (e.g. It works, I reload the page, then it doesn't work, while nothing changed)
Unfortunately I don't have permission to post the code, but any idea would be appreciated.
It was caused by an actionsupport tag inside of a commandbutton which I think should be fine, but it wasn't. I deleted the actionsupport, edited the button itself to contain the rerender and action attributes, and now it works.