rg4js in wizard sample code not defined in raygun.min.js?

Rohde

Posted on
Oct 27 2015

I followed the getting started wizard for the JS version. When I use the CDN hosted version, it works ok, but when using the minified prod version linked in the wizard:

http://cdn.raygun.io/raygun4js/beta-2.0.0/raygun.min.js

I get

Uncaught ReferenceError: rg4js is not defined

From the sample code

<script type="text/javascript">
  rg4js('apiKey', '29TUS/censoredLHtA==');
  rg4js('attach', true);
</script>   

Am I missing something obvious, or is this beta-build different from the linked CDN version?

(running it at http://localhost btw, although I don't think that should be the issue here)


Callum

Posted on
Oct 27 2015

Hi,

Apologies for the confusion here - did you manually download and add the minified raygun.min.js to your site? If this is the case, you can set up the provider using:

Raygun.init('29TUS/censoredLHtA==').attach();

instead of the above code snippet. We'll be sure to clarify the documentation for this case here.


Rohde

Posted on
Oct 28 2015

Thanks - that did the trick.


Reply