dbTalk Databases Forums  

Google Analytics javascript and dynamic SQL

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Google Analytics javascript and dynamic SQL in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Hartman-Berrier
 
Posts: n/a

Default Google Analytics javascript and dynamic SQL - 10-29-2010 , 09:59 AM






Hello,

I need to insert Google Analytics' javascript tracking code (either the
newer, asynchronous or the older, synchronous, mode) into dynamically-
generated SQL so that the number of "Confirmation of Enrolment" letters
which are printed by Dalhousie University students can be tracked. I am
not having success at this, and ask your help.

The older, synchronous javascript used in the university's main, static
html page has such stock GA code as

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl."
:"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%
3E"));

And includes the customized code

dalMainTracker._setDomainName('dal.ca');
dalMainTracker._addOrganic('search.dal.ca', 'q');
dalMainTracker._addOrganic('googlesyndicatedsearch .com', 'q');

The newer model is simpler, but presents its own challenges with leading
underscores and brackets. I've prefaced all the javascript lines with
"htp.p" and tried putting literals into variables thusly:

htp.p('</script>')
htp.p('<script ' || gaTyp || '"text/javascript">');

I've tried both versions of Google's code. The sqlplus compiler
complains mightily about the single/double quote combinations, and I
have not gotten a valid combination of double and triple quotes to
work, and neither have I gotten a working escape-character process to
work in the compiler, telling it to ignore quotes, underscores,
brackets, etc.

Has anybody gotten Google Analytics (or other javascript) to work in
dynamic SQL packages? If you have, would you share your technique(s)
and/or code samples?

Many thanks,

*-*-*-*-*
Bob Hartman-Berrier
Administrative Computing
Dalhousie University

Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: Google Analytics javascript and dynamic SQL - 10-29-2010 , 10:58 AM






On Oct 29, 7:59*am, "Bob Hartman-Berrier" <eo838... (AT) qny (DOT) pn> wrote:
Quote:
Hello,

I need to insert Google Analytics' javascript tracking code (either the
newer, asynchronous or the older, synchronous, mode) into dynamically-
generated SQL so that the number of "Confirmation of Enrolment" letters
which are printed by Dalhousie University students can be tracked. *I am
not having success at this, and ask your help.
Please check spelling :-)

....

Quote:
I've tried both versions of Google's code. The sqlplus compiler
complains mightily about the single/double quote combinations, and I
have not gotten a valid *combination of double and triple quotes to
work, and neither have I gotten a working escape-character process to
work in the compiler, telling it to ignore quotes, underscores,
brackets, etc.

Has anybody gotten Google Analytics (or other javascript) to work in
dynamic SQL packages? *If you have, would you share your technique(s)
and/or code samples?
Don't know (and am curious also to see working code), but I know just
in shell scripting I've had to put as many as 7 single quotes to get
them out right. In some tools (like awk for example) it can help to
use escaped values like \047. It makes more sense when you get all
the rules for all the layers into your brain at once.

jg
--
@home.com is bogus.
http://www.signonsandiego.com/news/2...ts-in-vietnam/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.