No, the javascript is being output on the page. I'm simply emailing myself the same thing that gets output to the page so that I can compare it with what google's samples show. Since it doesn't actually get run within a browser I have to either do that or save a file. But if you look at the PHP code you'll see each section of $js_output gets printed to the screen and then the collection of those ($js_output_email) is what I'm emailing myself just to see what it did.
There is a way I can get this same script to load within a browser and when I do I wind up with nothing but that javascript code in the page when I view source as expected.
Main Topics
Browse All Topics





by: TiggeritoPosted on 2009-05-21 at 03:33:54ID: 24439767
From what I understand, you are sending an email with the analytics code in it.
I think most email readers will not execute javascript, so your code will not get run. It may also cause your emails to be flagged as suspicious or spam.
You want to have the javascript apear on the thankyou page that I presume you generate after sending the email.