Skip to content

Commit

Permalink
check if _gat exists before including ga.js
Browse files Browse the repository at this point in the history
This is supposed to allow users to use dc.js with gas. 
They should include the dc.js file synchronously before the _gas code 
snippet.
  • Loading branch information
eduardocereto committed Nov 19, 2012
1 parent 715c184 commit 077da0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrapup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while (_gas._queue.length > 0) {
}

// Import ga.js
if (_gaq && _gaq.length >= 0) {
if (typeof window._gat === 'undefined') {
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
Expand Down

3 comments on commit 077da0c

@tomfuertes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o/ \o

Much more elegant solution!

@simonmadsen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want to add ashx as file format for download as MS often wraps for example pdf in ashx etc

@simonmadsen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we found the vimeo tracking to work better than others.
if you get time perhaps outline what code we could extract from the gas file to just make this vimeo tracking
the vimeo code itself that you have made, but perhaps also soom hooks and listeners?

anyway otherwise i will have a look but if you have any helpful input it is welcome

Please sign in to comment.