How to __DISABLE_SECURE_MODE when importing library from vanilla Javascript #305
-
I'm importing openreplay using the installation code on a simple HTML/Javascript/CSS site. How can I set __DISABLE_SECURE_MODE to true? Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I'd like to do this too, is that even possible? |
Beta Was this translation helpful? Give feedback.
-
This unfortunately not possible using the snippet. This option is only available for the NPM setup. |
Beta Was this translation helpful? Give feedback.
-
This may be fixed with
|
Beta Was this translation helpful? Give feedback.
-
Yes, this has been added in OpenReplay <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])};
r.setMetadata=function(k,v){r.push([4,k,v])};
r.event=function(k,p,i){r.push([5,k,p,i])};
r.issue=function(k,p){r.push([6,k,p])};
r.isActive=function(){return false};
r.getSessionToken=function(){};
})("//static.openreplay.com/latest/openreplay.js",1,0,initOpts,startOpts);
</script> |
Beta Was this translation helpful? Give feedback.
Yes, this has been added in OpenReplay
v1.5.3
and trackerv3.5.3
.__DISABLE_SECURE_MODE
can now be passed in `initOpts. Below is the new snippet: