Skip to content

Commit

Permalink
fix(gatsby-plugin-fullstory): Updated to Edge URL + Add Update… (#23089)
Browse files Browse the repository at this point in the history
* Updated to Edge URL + Add Updated JS Code

Refer to issue #23088

* update snapshots

Co-authored-by: LekoArts <lekoarts@gmail.com>
  • Loading branch information
ar0ra1 and LekoArts authored Apr 14, 2020
1 parent d32baae commit 843cf3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Array [
"__html": "
window['_fs_debug'] = false;
window['_fs_host'] = 'fullstory.com';
window['_fs_script'] = 'fullstory.com/s/fs.js';
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
window['_fs_org'] = 'test-org';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
Expand All @@ -19,11 +19,15 @@ window['_fs_namespace'] = 'FS';
o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
g.anonymize=function(){g.identify(!!0)};
g.shutdown=function(){g(\\"rec\\",!1)};g.restart=function(){g(\\"rec\\",!0)};
g.log = function(a,b) { g(\\"log\\", [a,b]) };
g.log = function(a,b){g(\\"log\\",[a,b])};
g.consent=function(a){g(\\"consent\\",!arguments.length||a)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(){};
g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
g._v=\\"1.2.0\\";
})(window,document,window['_fs_namespace'],'script','user');
",
}
Expand Down
8 changes: 6 additions & 2 deletions packages/gatsby-plugin-fullstory/src/gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const onRenderBody = ({ setHeadComponents }, pluginOptions) => {
__html: `
window['_fs_debug'] = false;
window['_fs_host'] = 'fullstory.com';
window['_fs_script'] = 'fullstory.com/s/fs.js';
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
window['_fs_org'] = '${pluginOptions.fs_org}';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
Expand All @@ -18,11 +18,15 @@ window['_fs_namespace'] = 'FS';
o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
g.anonymize=function(){g.identify(!!0)};
g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
g.log = function(a,b) { g("log", [a,b]) };
g.log = function(a,b){g("log",[a,b])};
g.consent=function(a){g("consent",!arguments.length||a)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(){};
g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
g._v="1.2.0";
})(window,document,window['_fs_namespace'],'script','user');
`,
}}
Expand Down

0 comments on commit 843cf3a

Please sign in to comment.