Skip to content

How to __DISABLE_SECURE_MODE when importing library from vanilla Javascript #305

Answered by estradino
alejandrofloresm asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this has been added in OpenReplay v1.5.3 and tracker v3.5.3.
__DISABLE_SECURE_MODE can now be passed in `initOpts. Below is the new snippet:

<script>
  var initOpts = {
    projectKey: "PROJECT_KEY",
    defaultInputMode: 0,
    obscureTextNumbers: false,
    obscureTextEmails: false,
  };
  var startOpts = { userID: "" };
  (function(A,s,a,y,e,r){
    r=window.OpenReplay=[e,r,y,[s-1, e]];
    s=document.createElement('script');s.src=A;s.async=!a;
    document.getElementsByTagName('head')[0].appendChild(s);
    r.start=function(v){r.push([0])};
    r.stop=function(v){r.push([1])};
    r.setUserID=function(id){r.push([2,id])};
    r.setUserAnonymousID=function(id){r.push([3,id])};

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fev4
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mir1198yusuf
Comment options

Answer selected by shekarsiri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested tracker
5 participants
Converted from issue

This discussion was converted from issue #169 on February 04, 2022 10:45.