I would suggest this instead:

```
if (typeof ga !== 'undefined' && ga.loaded) { }
```

otherwise you get a reference error.