I'm trying to set an evar in DTM but nothing is actually firing. I am trying to capture the user id that is set in a data layer using evar5 and am trying to pass it in a page load rule, but I don't see anything in the debugger tool or adobe report suite.
Attached is a screenshot showing how I am setting the evar, any advice on why this may not be working?
Few things you should try:
Check if the page load rule where in you have defined the above is executing or not ? Either type _satellite.setDebug(true); in browser console before you load the page or use Adobe DTM switch browser plugin.
If rule is executing, check if userid data element is receiving any value. Type _satellite.getVar('user id'); in the console and check.
If rule is not executing, debug the page load rule condition in the browser console after putting checkpoints in the satellite JS rendering on the page.
These steps will make you reach closer to the root cause of the issue.
If you haven't published the rule, Make sure the page you are on is loading the staging library or make sure you tell the page to load it.
localStorage.setItem('sdsat_stagingLibrary',true);
Then refresh the page.
Related
Steps to reproduce in our application:
Log out.
Clear the cache.
Reload the page.
Log in.
Actual: You stay on the front page.
Expected: The application opens.
Our main template shows the app if a user is logged in (specifically, {{#if currentUser}}). Otherwise, it shows a splash page where the user can create an account and log in.
We're using the {{loginButtons}} helper.
Would this be a use case for Meteor.flush()? How would I get that to trigger upon user login? Meteor.autorun()?
Could it be that the logic isn't actually in a template you've defined but rather in the index.html itself? I could see how that might cause issues if it hasn't been broken out into some sort of front page logic template from which you call the other templates. Just an idea.
There were a couple things that led to a solution here.
I restructured my front page template to take {{loggingIn}} into account. Before, I was only using {{currentUser}}.
I made sure I wasn't setting Session variables in template helpers, especially not those where I was also getting them in other code paths. This explains why the issue felt like a race condition and only happened with a "cold cache" as I put it.
Also, the reason the view wasn't changing was because of errors preventing it from doing so. So it was a symptom, not the actual problem (although I did need to improve the template conditions a bit).
The Chrome network debugger gives me a great view of all the HTTP resources loaded for a page. But it clears the list whenever a new top-level HTML page is loaded. This makes it very difficult to debug pages that automatically reload for one reason or another (running script or 300 responses).
Can I tell Chrome not to clear the network debugger when a new top-level page is loaded? Or can I go back and look at the previous page's network resources?
Or can I somehow force Chrome to pause before loading a new page when I don't control the page I'm trying to debug that's doing the redirecting? It's part of an OpenID dance that's going awry, so the combination of SSL and credentials makes it extremely difficult to debug with command-line tools.
This has been changed since v32, thanks to #Daniel Alexiuc & #Thanatos for their comments.
Current (≥ v32)
At the top of the "Network" tab of DevTools, there's a checkbox to switch on the "Preserve log" functionality. If it is checked, the network log is preserved on page load.
The little red dot on the left now has the purpose to switch network logging on and off completely.
Older versions
In older versions of Chrome (v21 here), there's a little, clickable red dot in the footer of the "Network" tab.
If you hover over it, it will tell you, that it will "Preserve Log Upon Navigation" when it is activated. It holds the promise.
I don't know of a way to force Chrome to not clear the Network debugger, but this might accomplish what you're looking for:
Open the js console
window.addEventListener("beforeunload", function() { debugger; }, false)
This will pause chrome before loading the new page by hitting a breakpoint.
Another great solution to debug the Network calls before redirecting to other pages is to select the beforeunload event break point
This way you assure to break the flow right before it redirecting it to another page, this way all network calls, network data and console logs are still there.
This solution is best when you want to check what is the response of the calls
P.S:
You can also use XHR break points if you want to stop right before a specific call or any call (see image example)
Just update of #bfncs answer
I think around Chrome 43 the behavior was changed a little. You still need to enable Preserve log to see, but now redirect shown under Other tab, when loaded document is shown under Doc.
This always confuse me, because I have a lot of networks requests and filter it by type XHR, Doc, JS etc. But in case of redirect the Doc tab is empty, so I have to guess.
This works in other browsers but not in chrome. I am trying to allow users to upload large files and have an ajax call to update them on the progress of the file upload.
So a unique ID is generated on the client side and added to the action of the form before sending. Then the form is submitted (form only contains a file upload input) and an ajax call is made to get the progress of the upload.
The ajax call goes to another page and uses the ID to lookup the upload.
I am using JQuery 1.5.1. Debugging this and putting something on the error function give me nothing other than "error". Not very helpful. I used Chrome's debugger and it just says failed to load resource xxxx.aspx. xxx.aspx is the URL i needed. Turns out that there seems to be some sort of conflict between the form and the ajax call.
Is there some way to get around this?
you should really look at SWFupload, a great flash based uploader, with concurrent upload and progressbar support. Also it makes it really easy to use server-side, you dont need to implement upload percentage view as it client-side based.
not exactly an answer to your question, but a link to a tool that can really help you drill down and find good error messages, step through javascript code and such would be firebug for Chrome, I got the IE and Chrome versions working and use it very regularly, it has been a life saver and greatly has decreased debugging time:
http://getfirebug.com/releases/lite/chrome/
I would suggest making firebug a common tool in your debugging arsenal.
Use SlickUpload
It is a server control and module that does exactly what you are looking for and takes less than 10 minutes to setup.
Documentation: http://krystalware.com/Products/SlickUpload/Documentation/overview/
My web-app records users via webcam and microphone. I want to use HTML/JS for the controls and content, so I created two separate Flex modules:
* A "Webcam Setup" module that lets you choose your camera and mic input devices
* A "record" module that lets the user record and submit the recording
When I embed either of these on the page, since they access the user's Camera/Mic object, Flash shows the Privacy dialog that says "[mysite] is requesting access to your camera and microphone. If you click Allow, you may be recorded."
The problem is, if I answer Yes in the Setup module, and later add the Record module to the page using Javascript, it again shows the Privacy dialog.
Is there a way to avoid the second privacy popup?
I would think that saying "Yes" for [mysite] would store that permission for at least that session, but apparently not.
What I've tried
I tried combining them into one SWF, adding it to the page once and moving the DOM element with jQuery's append() function when needed. When I move it, however, it reloads and asks me again.
Imagine if [mysite] was, say, blogger.com or livejournal.com (or, if it were still around, geocities.com). Would you want a "yes" response on that site to be good for every page under that domain?
Rememeber, just because you promise (cross your heart & hope to die) not to abuse the security hole you request, doesn't mean they can allow you to have that security hole.
Eventually, I found a usable workaround, similar to what I originally tried (above).
I combined the setup and record modules into one SWF. I first show the setup screen. When the user hits the Continue button on my page, Javascript calls a function in the SWF to swap to the Record screen.
I then move the <div> containing the Flash object to another location on page using absolute positioning, and resize the object.
Previously, I was trying to use jQuery's append() function to move the div within the DOM, and that was causing the SWF to reload. Just changing position and size does actually work.
You could build the "record" component to simply send and receive signals using an API you've created for your "setup" component (which has already been authorized, meaning one auth & two swfs) by using the LocalConnection class:
http://livedocs.adobe.com/flex/3/langref/flash/net/LocalConnection.html
This seems far closer to best practice than the other implementations mentioned, which smell a bit hacky and would probably confuse anyone who may inherit the codebase in the future.
We are adding openfire fastpath chat to our site. It will determine and indicate when live chat is available or not and display an appropriate image to indicate the current status and links for each state.
The javascript call hit's a function that is on another box and this function uses document.write to output the html to the page. I know there is a delay because it is making the request to another server and waiting for a result to be returned. The pause here is about a half second, but causes the rest of the page load to be held up.
Has anyone experience a similar issue or offer any tips for getting this to load synchronously somehow. I tried putting this into an aspx ajax panel, but that seemed to cause other issues.
I used an iframe that is the only thing I could find that seemed to work.